ResourceIteratorInterface
extends
ToArrayInterface, HasDispatcherInterface, Iterator, Countable
in
Iterates over a paginated resource using subsequent requests in order to retrieve the entire matching result set
Table of Contents
Methods
- addSubscriber() : self
- Add an event subscriber to the dispatcher
- dispatch() : Event
- Helper to dispatch Guzzle events and set the event name on the event
- get() : mixed|null
- Get a data option from the iterator
- getAllEvents() : array<string|int, mixed>
- Get a list of all of the events emitted from the class
- getEventDispatcher() : EventDispatcherInterface
- Get the EventDispatcher of the request
- getNextToken() : string
- Retrieve the NextToken that can be used in other iterators.
- set() : ResourceIteratorInterface
- Set a data option on the iterator
- setEventDispatcher() : self
- Set the EventDispatcher of the request
- setLimit() : ResourceIteratorInterface
- Attempt to limit the total number of resources returned by the iterator.
- setPageSize() : ResourceIteratorInterface
- Attempt to limit the total number of resources retrieved per request by the iterator.
- toArray() : array<string|int, mixed>
- Get the array representation of an object
Methods
addSubscriber()
Add an event subscriber to the dispatcher
public
addSubscriber(EventSubscriberInterface $subscriber) : self
Parameters
- $subscriber : EventSubscriberInterface
-
Event subscriber
Return values
selfdispatch()
Helper to dispatch Guzzle events and set the event name on the event
public
dispatch(string $eventName[, array<string|int, mixed> $context = array() ]) : Event
Parameters
- $eventName : string
-
Name of the event to dispatch
- $context : array<string|int, mixed> = array()
-
Context of the event
Return values
Event —Returns the created event object
get()
Get a data option from the iterator
public
get(string $key) : mixed|null
Parameters
- $key : string
-
Key of the option to retrieve
Return values
mixed|null —Returns NULL if not set or the value if set
getAllEvents()
Get a list of all of the events emitted from the class
public
static getAllEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>getEventDispatcher()
Get the EventDispatcher of the request
public
getEventDispatcher() : EventDispatcherInterface
Return values
EventDispatcherInterfacegetNextToken()
Retrieve the NextToken that can be used in other iterators.
public
getNextToken() : string
Return values
string —Returns a NextToken
set()
Set a data option on the iterator
public
set(string $key, mixed $value) : ResourceIteratorInterface
Parameters
- $key : string
-
Key of the option to set
- $value : mixed
-
Value to set for the option
Return values
ResourceIteratorInterfacesetEventDispatcher()
Set the EventDispatcher of the request
public
setEventDispatcher(EventDispatcherInterface $eventDispatcher) : self
Parameters
- $eventDispatcher : EventDispatcherInterface
Return values
selfsetLimit()
Attempt to limit the total number of resources returned by the iterator.
public
setLimit(int $limit) : ResourceIteratorInterface
You may still receive more items than you specify. Set to 0 to specify no limit.
Parameters
- $limit : int
-
Limit amount
Return values
ResourceIteratorInterfacesetPageSize()
Attempt to limit the total number of resources retrieved per request by the iterator.
public
setPageSize(int $pageSize) : ResourceIteratorInterface
The iterator may return more than you specify in the page size argument depending on the service and underlying command implementation. Set to 0 to specify no page size limitation.
Parameters
- $pageSize : int
-
Limit amount
Return values
ResourceIteratorInterfacetoArray()
Get the array representation of an object
public
toArray() : array<string|int, mixed>