ResourceArray
class ResourceArray implements Countable, ArrayAccess, IteratorAggregate, JsonSerializable
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 an object to be used by json_encode
to serialize objects of this class.
Returns the number of resources in this array.
Returns a \Traversable to allow iterating the ResourceArray.
No description
No description
This method is not implemented since a ResourceArray is read-only.
This method is not implemented since a ResourceArray is read-only.
Details
at line 46
__construct(array $items, int $total, int $limit, int $skip)
ResourceArray constructor.
at line 61
int
getTotal()
Returns the total amount of resources matching the filter.
at line 73
int
getLimit()
The limit used when retrieving this ResourceArray.
at line 85
int
getSkip()
The number of skipped resources when retrieving this ResourceArray.
at line 97
array
getItems()
Get the returned values as a PHP array.
at line 111
object
jsonSerialize()
Returns an object to be used by json_encode
to serialize objects of this class.
at line 132
int
count()
Returns the number of resources in this array.
at line 145
Traversable
getIterator()
Returns a \Traversable to allow iterating the ResourceArray.
at line 158
bool
offsetExists(mixed $offset)
at line 171
mixed
offsetGet(mixed $offset)
at line 186
offsetSet(mixed $offset, mixed $value)
This method is not implemented since a ResourceArray is read-only.
at line 200
offsetUnset(mixed $offset)
This method is not implemented since a ResourceArray is read-only.