Listable
interface Listable
Represents a resource that can be enumerated (listed over).
Methods
This method iterates over a collection of resources. It sends the operation's request to the API, parses the response, converts each element into {see self} and - if pagination is supported - continues to send requests until an empty collection is received back.
Details
enumerate(array $def, array $userVals = array(), callable $mapFn = null)
This method iterates over a collection of resources. It sends the operation's request to the API, parses the response, converts each element into {see self} and - if pagination is supported - continues to send requests until an empty collection is received back.
For paginated collections, it sends subsequent requests according to a marker URL query. The value of the marker will depend on the last element returned in the previous response. If a limit is provided, the loop will continue up until that point.