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.
Find a specific tag by its id.
Returns all tags in the current space and environment.
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 41
getAsset(string $assetId, string $locale = null)
Returns a single Asset object corresponding to the given ID.
at line 48
ResourceArray|Asset[]
getAssets(Query $query = null)
Returns a collection of Asset objects wrapped in a ResourceArray instance.
at line 55
getContentType(string $contentTypeId)
Returns a single ContentType object corresponding to the given ID.
at line 62
ResourceArray|ContentType[]
getContentTypes(Query $query = null)
Returns a collection of ContentType objects wrapped in a ResourceArray instance.
at line 67
getEnvironment()
Returns the Environment object corresponding to the one in use.
at line 74
getEntry(string $entryId, string $locale = null)
Returns a single Entry object corresponding to the given ID.
at line 81
ResourceArray|Entry[]
getEntries(Query $query = null)
Returns a collection of Entry objects wrapped in a ResourceArray instance.
at line 86
getSpace()
Returns the Space object corresponding to the one in use.
at line 93
getTag(string $tagId)
Find a specific tag by its id.
at line 100
Tag[]
getAllTags()
Returns all tags in the current space and environment.
at line 109
resolveLink(Link $link, string $locale = null)
Resolve a link to its actual resource.
at line 120
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.