class ObjectRetriever

The ObjectRetriever provides access to objects on CloudObjects.

Traits

LoggerAwareTrait

Constants

CO_API_URL

REVISION_PROPERTY

Methods

__construct($options = [])

No description

getClient()

Get the HTTP client that is used to access the API.

setClient(ClientInterface $client, string $prefix = null)

Set the HTTP client that is used to access the API.

Node|null
getObject(IRI $coid)

Get an object description from CloudObjects. Attempts to get object from in-memory cache first, stored static configurations next, configured external cache third, and finally calls the Object API on CloudObjects Core. Returns null if the object was not found.

array
fetchObjectsInNamespaceWithType(IRI $namespaceCoid, $type)

Fetch all object descriptions for objects in a specific namespace and with a certain type from CloudObjects. Adds individual objects to cache and returns a list of COIDs (as IRI) for them. The list itself is not cached, which means that every call of this function goes to the Object API.

array
fetchAllObjectsInNamespace(IRI $namespaceCoid)

Fetch all object descriptions for objects in a specific namespace from CloudObjects. Adds individual objects to cache and returns a list of COIDs (as IRI) for them. The list itself is not cached, which means that every call of this function goes to the Object API.

Node|null
get(any $coid)

Get an object description from CloudObjects. Shorthand method for "getObject" which allows passing the COID as string instead of IRI.

getAttachment(IRI $coid, string $filename)

Get a object's attachment.

Node
getAuthenticatingNamespaceObject()

Retrieve the object that describes the namespace provided with the "auth_ns" configuration option.

Details

at line 34
__construct($options = [])

Parameters

$options

at line 121
getClient()

Get the HTTP client that is used to access the API.

at line 131
setClient(ClientInterface $client, string $prefix = null)

Set the HTTP client that is used to access the API.

Parameters

ClientInterface $client The HTTP client.
string $prefix An optional prefix (e.g. an AccountGateway mountpoint)

at line 145
Node|null getObject(IRI $coid)

Get an object description from CloudObjects. Attempts to get object from in-memory cache first, stored static configurations next, configured external cache third, and finally calls the Object API on CloudObjects Core. Returns null if the object was not found.

Parameters

IRI $coid COID of the object

Return Value

Node|null

at line 205
array fetchObjectsInNamespaceWithType(IRI $namespaceCoid, $type)

Fetch all object descriptions for objects in a specific namespace and with a certain type from CloudObjects. Adds individual objects to cache and returns a list of COIDs (as IRI) for them. The list itself is not cached, which means that every call of this function goes to the Object API.

Parameters

IRI $namespaceCoid COID of the namespace
$type RDF type that objects should have

Return Value

array

at line 249
array fetchAllObjectsInNamespace(IRI $namespaceCoid)

Fetch all object descriptions for objects in a specific namespace from CloudObjects. Adds individual objects to cache and returns a list of COIDs (as IRI) for them. The list itself is not cached, which means that every call of this function goes to the Object API.

Parameters

IRI $namespaceCoid COID of the namespace

Return Value

array

at line 289
Node|null get(any $coid)

Get an object description from CloudObjects. Shorthand method for "getObject" which allows passing the COID as string instead of IRI.

Parameters

any $coid

Return Value

Node|null

at line 305
getAttachment(IRI $coid, string $filename)

Get a object's attachment.

Parameters

IRI $coid
string $filename

at line 352
Node getAuthenticatingNamespaceObject()

Retrieve the object that describes the namespace provided with the "auth_ns" configuration option.

Return Value

Node