ClientInterface
interface ClientInterface implements ScopedClientInterface
ClientInterface.
This interface should be used whenever referring to a client object instance, as it decouples the method signatures from the actual implementation.
It provides definitions for all methods which return API resources.
Methods
Returns a single Asset object corresponding to the given ID.
Returns a single ContentType object corresponding to the given ID.
Returns a collection of ContentType objects wrapped in a ResourceArray instance.
Returns the Environment object corresponding to the one in use.
Returns a single Entry object corresponding to the given ID.
Returns a collection of Entry objects wrapped in a ResourceArray instance.
Returns the Space object corresponding to the one in use.
Resolve a link to its actual resource.
Resolves an array of links.
Details
in ScopedClientInterface at line 19
getApi()
Returns a string representation of the API currently in use.
in ScopedClientInterface at line 24
getSpaceId()
Returns the ID of the space currently in use.
in ScopedClientInterface at line 29
getEnvironmentId()
Returns the ID of the environment currently in use.
at line 40
getAsset(string $assetId, string $locale = null)
Returns a single Asset object corresponding to the given ID.
at line 47
ResourceArray|Asset[]
getAssets(Query $query = null)
Returns a collection of Asset objects wrapped in a ResourceArray instance.
at line 54
getContentType(string $contentTypeId)
Returns a single ContentType object corresponding to the given ID.
at line 61
ResourceArray|ContentType[]
getContentTypes(Query $query = null)
Returns a collection of ContentType objects wrapped in a ResourceArray instance.
at line 66
getEnvironment()
Returns the Environment object corresponding to the one in use.
at line 73
getEntry(string $entryId, string $locale = null)
Returns a single Entry object corresponding to the given ID.
at line 80
ResourceArray|Entry[]
getEntries(Query $query = null)
Returns a collection of Entry objects wrapped in a ResourceArray instance.
at line 85
getSpace()
Returns the Space object corresponding to the one in use.
at line 94
resolveLink(Link $link, string $locale = null)
Resolve a link to its actual resource.
at line 105
ResourceInterface[]
resolveLinkCollection(array $links, string $locale = null)
Resolves an array of links.
A method implementing this may apply some optimizations to reduce the amount of necessary API calls.