Documentation

ResourceIteratorInterface extends ToArrayInterface, HasDispatcherInterface, Iterator, Countable

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

dispatch()

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>

getNextToken()

Retrieve the NextToken that can be used in other iterators.

public getNextToken() : string
Return values
string

Returns a NextToken

setPageSize()

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
ResourceIteratorInterface

toArray()

Get the array representation of an object

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results