Class StateFactory
The state factory is responsible for instantiating state classes from REST API responses.
Direct known subclasses
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchStateFactory
Indirect known subclasses
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilyTree\FamilyTreeStateFactory
Methods summary
public
|
#
__construct( boolean $production = false )
Constructs a new instance of this state factory, using the environment specified (defaults to integration). |
public
|
#
newCollectionState( string $uri = null, GuzzleHttp\Client $method = "GET", GuzzleHttp\Client $client = null )
Returns a new collection state by invoking the specified URI and method, using the specified client. |
public
|
#
newCollectionsState( string $uri = null, GuzzleHttp\Client $method = "GET", GuzzleHttp\Client $client = null )
Returns a new collections state by invoking the specified URI and method, using the specified client. |
public
|
#
newDiscoveryState( string $uri = null, GuzzleHttp\Client $method = "GET", GuzzleHttp\Client $client = null )
Returns a new discovery state by invoking the specified URI and method, using the specified client. |
public
|
#
newPersonState( string $uri, GuzzleHttp\Client $client = null, string $method = "GET" )
Returns a new person state by invoking the specified URI and method, using the specified client. |
public
mixed
|
#
createState( string $class, GuzzleHttp\Client $client, GuzzleHttp\Psr7\Request $request, GuzzleHttp\Psr7\Response $response, string $accessToken )
Dynamically creates and returns a state instance for the specified class, if a state builder is defined. |
Constants summary
string |
PRODUCTION_URI
The default production environment URI for the family tree. |
#
"https://api.familysearch.org/platform/collections/tree"
|
string |
INTEGRATION_URI
The default integration environment URI for the family tree. |
#
"https://api-integ.familysearch.org/platform/collections/tree"
|
string |
PRODUCTION_DISCOVERY_URI
The default production environment URI for the discovery endpoint. |
#
"https://api.familysearch.org/platform/collection"
|
string |
INTEGRATION_DISCOVERY_URI
The default integration environment URI for the discovery endpoint. |
#
"https://api-integ.familysearch.org/platform/collection"
|