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 string representation of the API currently in use.
Returns the ID of the environment currently in use.
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.
Resolve a link to its actual resource.
Resolves an array of links.
Details
in ScopedClientInterface at line 21
string
getApi()
Returns a string representation of the API currently in use.
in ScopedClientInterface at line 28
string
getSpaceId()
Returns the ID of the space currently in use.
in ScopedClientInterface at line 35
string
getEnvironmentId()
Returns the ID of the environment currently in use.
at line 45
Asset
getAsset(string $assetId, string $locale = \null)
Returns a single Asset object corresponding to the given ID.
at line 54
ResourceArray|Asset[]
getAssets(Query $query = \null)
Returns a collection of Asset objects wrapped in a ResourceArray instance.
at line 65
ContentType
getContentType(string $contentTypeId)
Returns a single ContentType object corresponding to the given ID.
at line 74
ResourceArray|ContentType[]
getContentTypes(Query $query = \null)
Returns a collection of ContentType objects wrapped in a ResourceArray instance.
at line 81
Environment
getEnvironment()
Returns the Environment object corresponding to the one in use.
at line 93
Entry
getEntry(string $entryId, string $locale = \null)
Returns a single Entry object corresponding to the given ID.
at line 102
ResourceArray|Entry[]
getEntries(Query $query = \null)
Returns a collection of Entry objects wrapped in a ResourceArray instance.
at line 109
Space
getSpace()
Returns the Space object corresponding to the one in use.
at line 121
ResourceInterface
resolveLink(Link $link, string $locale = \null)
Resolve a link to its actual resource.
at line 133
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.