gedcomx-php-client
  • Namespace
  • Class

Namespaces

  • Gedcomx
    • Agent
    • Atom
    • Common
    • Conclusion
    • Extensions
      • FamilySearch
        • Platform
          • Artifacts
          • Discussions
          • Tree
          • Users
        • Rs
          • Client
            • FamilyTree
            • Helpers
            • Memories
            • Util
        • Rt
        • Types
    • GedcomxFile
    • Links
    • Records
    • Rs
      • Client
        • Exception
        • Options
        • Util
    • Rt
    • Search
    • Source
    • Support
    • Types
    • Util
    • Vocab

Classes

  • AgentState
  • AncestryResultsState
  • CollectionsState
  • CollectionState
  • DescendancyResultsState
  • GedcomxApplicationState
  • GedcomxSearchQuery
  • PersonChildrenState
  • PersonParentsState
  • PersonSearchResultsState
  • PersonSpousesState
  • PersonsState
  • PersonState
  • PlaceDescriptionsState
  • PlaceDescriptionState
  • PlaceGroupState
  • PlaceSearchResultsState
  • RecordsState
  • RecordState
  • Rel
  • RelationshipsState
  • RelationshipState
  • SearchParameter
  • SourceDescriptionsState
  • SourceDescriptionState
  • StateFactory
  • VocabConstants
  • VocabElementListState
  • VocabElementState

Interfaces

  • SupportsExtensionElements

Class CollectionState

The CollectionState is a collection of resources and exposes management of those resources.

Class CollectionState

Gedcomx\Rs\Client\GedcomxApplicationState
Extended by Gedcomx\Rs\Client\CollectionState

Direct known subclasses

Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchCollectionState

Indirect known subclasses

Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchPlaces, Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchPlaceState, Gedcomx\Extensions\FamilySearch\Rs\Client\FamilyTree\ChildAndParentsRelationshipState, Gedcomx\Extensions\FamilySearch\Rs\Client\FamilyTree\FamilyTreeCollectionState, Gedcomx\Extensions\FamilySearch\Rs\Client\Memories\FamilySearchMemories, Gedcomx\Extensions\FamilySearch\Rs\Client\PersonMergeState, Gedcomx\Extensions\FamilySearch\Rs\Client\UserHistoryState, Gedcomx\Extensions\FamilySearch\Rs\Client\UserState

Namespace: Gedcomx\Rs\Client
Package: Gedcomx\Rs\Client
Located at Rs/Client/CollectionState.php

Methods summary

public
# __construct( GuzzleHttp\Client $client, GuzzleHttp\Psr7\Request $request, GuzzleHttp\Psr7\Response $response, string $accessToken, Gedcomx\Rs\Client\StateFactory $stateFactory )

Constructs a new collection state using the specified client, request, response, access token, and state factory.

Constructs a new collection state using the specified client, request, response, access token, and state factory.

Parameters

$client
$request
$response
$accessToken
$stateFactory

Overrides

Gedcomx\Rs\Client\GedcomxApplicationState::__construct
public Gedcomx\Records\Collection|null
# getCollection( )

Gets the first collection from the current list of collections (in the entity).

Gets the first collection from the current list of collections (in the entity).

Returns

Gedcomx\Records\Collection|null
public Gedcomx\Rs\Client\CollectionState|null
# update( Gedcomx\Records\Collection $collection, Gedcomx\Rs\Client\Options\StateTransitionOption $options = null )

Updates the specified collection.

Updates the specified collection.

Parameters

$collection
$options

Returns

Gedcomx\Rs\Client\CollectionState|null
public Gedcomx\Rs\Client\RecordsState|null
# readRecords( Gedcomx\Rs\Client\Options\StateTransitionOption $options = null )

Reads records from this collection.

Reads records from this collection.

Parameters

$options

Returns

Gedcomx\Rs\Client\RecordsState|null
public Gedcomx\Rs\Client\RecordState|null
# addRecord( Gedcomx\Gedcomx $record, Gedcomx\Rs\Client\Options\StateTransitionOption $options = null )

Adds a record to this collection.

Adds a record to this collection.

Parameters

$record
$options

Returns

Gedcomx\Rs\Client\RecordState|null

Throws

Gedcomx\Rs\Client\Exception\GedcomxApplicationException
public Gedcomx\Rs\Client\PersonState|null
# readPersonForCurrentUser( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads the person record for the current user.

Reads the person record for the current user.

Parameters

$option

Returns

Gedcomx\Rs\Client\PersonState|null
public Gedcomx\Rs\Client\PersonsState|null
# readPersons( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Creates a persons collection from the current collection.

Creates a persons collection from the current collection.

Parameters

$option

Returns

Gedcomx\Rs\Client\PersonsState|null
public
# readPerson( string $uri, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads the person specified by the URI.

Reads the person specified by the URI.

Parameters

$uri
href from a Link object
$option

Returns

PersonState|null
public Gedcomx\Rs\Client\PersonSearchResultsState|null
# searchForPersons( Gedcomx\Rs\Client\GedcomxSearchQuery|string $query, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Searches for persons based off the specified query.

Searches for persons based off the specified query.

Parameters

$query
$option

Returns

Gedcomx\Rs\Client\PersonSearchResultsState|null
public Gedcomx\Rs\Client\PersonState|null
# addPerson( Gedcomx\Conclusion\Person|Gedcomx\Gedcomx $person, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds a person to the current collection.

Adds a person to the current collection.

Parameters

$person
$option

Returns

Gedcomx\Rs\Client\PersonState|null
public Gedcomx\Rs\Client\RelationshipState
# addRelationships( array $relationships, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds the array of relationships to the collection.

Adds the array of relationships to the collection.

Parameters

$relationships
$option

Returns

Gedcomx\Rs\Client\RelationshipState

Throws

Gedcomx\Rs\Client\Exception\GedcomxApplicationException
public Gedcomx\Rs\Client\RelationshipsState|null
# readRelationships( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads relationships from the current collection.

Reads relationships from the current collection.

Parameters

$option

Returns

Gedcomx\Rs\Client\RelationshipsState|null
public Gedcomx\Rs\Client\RelationshipState|null
# addRelationship( Gedcomx\Conclusion\Relationship $relationship, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds relationship to the collection.

Adds relationship to the collection.

Parameters

$relationship
$option

Returns

Gedcomx\Rs\Client\RelationshipState|null

Throws

Gedcomx\Rs\Client\Exception\GedcomxApplicationException
public Gedcomx\Rs\Client\RelationshipState|null
# addSpouseRelationship( Gedcomx\Rs\Client\PersonState $person1, Gedcomx\Rs\Client\PersonState $person2, Gedcomx\Conclusion\Fact $fact = null, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds a spouse relationship between the two persons and applies the specified fact.

Adds a spouse relationship between the two persons and applies the specified fact.

Parameters

$person1
$person2
$fact
$option

Returns

Gedcomx\Rs\Client\RelationshipState|null
public Gedcomx\Rs\Client\RelationshipState|null
# AddParentChildRelationship( Gedcomx\Rs\Client\PersonState $parent, Gedcomx\Rs\Client\PersonState $child, Gedcomx\Conclusion\Fact $fact = null, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds a parent child relationship between the two persons and applies the specified fact.

Adds a parent child relationship between the two persons and applies the specified fact.

Parameters

$parent
$child
$fact
$option

Returns

Gedcomx\Rs\Client\RelationshipState|null
public Gedcomx\Rs\Client\SourceDescriptionState
# addArtifact( Gedcomx\Rs\Client\Util\DataSource $artifact, Gedcomx\Source\SourceDescription $description = null, Gedcomx\Rs\Client\GedcomxApplicationState $state = null, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds an artifact to the collection.

Adds an artifact to the collection.

Parameters

$artifact
$description
$state
$option

Returns

Gedcomx\Rs\Client\SourceDescriptionState

Throws

Gedcomx\Rs\Client\Exception\GedcomxApplicationException
public Gedcomx\Rs\Client\SourceDescriptionsState|null
# readSourceDescriptions( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads the source descriptions for the current collection.

Reads the source descriptions for the current collection.

Parameters

$option

Returns

Gedcomx\Rs\Client\SourceDescriptionsState|null
public Gedcomx\Rs\Client\SourceDescriptionState|null
# addSourceDescription( Gedcomx\Source\SourceDescription $source, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds a source description to the current collection.

Adds a source description to the current collection.

Parameters

$source
$option

Returns

Gedcomx\Rs\Client\SourceDescriptionState|null

Throws

Gedcomx\Rs\Client\Exception\GedcomxApplicationException
public Gedcomx\Rs\Client\CollectionState|null
# readCollection( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads the collection specified by this state instance.

Reads the collection specified by this state instance.

Parameters

$option

Returns

Gedcomx\Rs\Client\CollectionState|null
public Gedcomx\Rs\Client\CollectionsState|null
# readSubcollections( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads the subcollections specified by this state instance.

Reads the subcollections specified by this state instance.

Parameters

$option

Returns

Gedcomx\Rs\Client\CollectionsState|null
public Gedcomx\Rs\Client\CollectionState|null
# addCollection( Gedcomx\Records\Collection $collection, Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Adds a collection to the subcollection resource specified by this state instance.

Adds a collection to the subcollection resource specified by this state instance.

Parameters

$collection
$option

Returns

Gedcomx\Rs\Client\CollectionState|null

Throws

Gedcomx\Rs\Client\Exception\GedcomxApplicationException
public Gedcomx\Rs\Client\SourceDescriptionsState|null
# readResourcesOfCurrentUser( Gedcomx\Rs\Client\Options\StateTransitionOption $option = null )

Reads the resources (a collection source descriptions) of the current user.

Reads the resources (a collection source descriptions) of the current user.

Parameters

$option

Returns

Gedcomx\Rs\Client\SourceDescriptionsState|null

Methods inherited from Gedcomx\Rs\Client\GedcomxApplicationState

authenticateViaOAuth2AuthCode(), authenticateViaOAuth2ClientCredentials(), authenticateViaOAuth2Password(), authenticateViaOAuth2WithoutCredentials(), authenticateWithAccessToken(), delete(), generateClientSecret(), get(), getAccessToken(), getClient(), getETag(), getEntity(), getHeader(), getHeaders(), getLastEmbeddedRequest(), getLastEmbeddedResponse(), getLastModified(), getLink(), getLinks(), getRequest(), getResourceReference(), getResponse(), getSelfRel(), getSelfUri(), getStatus(), getUri(), hasClientError(), hasError(), hasServerError(), hasStatus(), head(), ifSuccessful(), inject(), isAuthenticated(), loadAllEmbeddedResources(), logout(), options(), post(), put(), readAttributableContributor(), readContributor(), readReferenceContributor(), send()

gedcomx-php-client API documentation generated by ApiGen