ResourceArray
class ResourceArray implements ResourceInterface, Countable, ArrayAccess, IteratorAggregate
A ResourceArray holds the response of an API request if more than one resource has been requested.
In addition to the retrieved items themselves it also provides some access to metadata.
Methods
ResourceArray constructor.
Returns the total amount of resources matching the filter.
The limit used when retrieving this ResourceArray.
The number of skipped resources when retrieving this ResourceArray.
Get the returned values as a PHP array.
Returns the resource's system properties, defined in the object "sys" in Contentful's responses.
Creates a Link representation of the current resource.
Shortcut for retrieving the resource ID from the system properties object.
Shortcut for retrieving the resource type from the system properties object.
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
Details
at line 48
__construct(array $items, int $total, int $limit, int $skip)
ResourceArray constructor.
at line 59
getTotal()
Returns the total amount of resources matching the filter.
at line 67
getLimit()
The limit used when retrieving this ResourceArray.
at line 75
getSkip()
The number of skipped resources when retrieving this ResourceArray.
at line 85
ResourceInterface[]
getItems()
Get the returned values as a PHP array.
at line 93
SystemPropertiesInterface
getSystemProperties()
Returns the resource's system properties, defined in the object "sys" in Contentful's responses.
at line 101
asLink()
Creates a Link representation of the current resource.
at line 109
getId()
Shortcut for retrieving the resource ID from the system properties object.
at line 117
getType()
Shortcut for retrieving the resource type from the system properties object.
at line 125
jsonSerialize()
{@inheritdoc}
at line 141
count()
{@inheritdoc}
at line 149
getIterator()
{@inheritdoc}
at line 157
offsetExists($offset)
{@inheritdoc}
at line 165
offsetGet($offset)
{@inheritdoc}
at line 173
offsetSet($offset, $value)
{@inheritdoc}
at line 181
offsetUnset($offset)
{@inheritdoc}