Methods summary
public static
array
|
#
getAllEvents( )
Get a list of all of the events emitted from the class
Get a list of all of the events emitted from the class
Returns
array
Overrides
Implementation of
|
public
|
#
__construct( Guzzle\Service\Command\CommandInterface $command, array $data = array() )
This should only be invoked by a ClientInterface object.
This should only be invoked by a ClientInterface object.
Parameters
- $command
Guzzle\Service\Command\CommandInterface
$command Initial command used for iteration
- $data
array $data Associative array of additional parameters. You may specify any number of
custom options for an iterator. Among these options, you may also specify the
following values: - limit: Attempt to limit the maximum number of resources to
this amount - page_size: Attempt to retrieve this number of resources per
request
|
public
array
|
#
toArray( )
Get all of the resources as an array (Warning: this could issue a large
number of requests)
Get all of the resources as an array (Warning: this could issue a large
number of requests)
Returns
array
Implementation of
|
public
Guzzle\Service\Resource\ResourceIteratorInterface
|
#
setLimit( integer $limit )
Attempt to limit the total number of resources returned by the iterator.
Attempt to limit the total number of resources returned by the iterator.
Parameters
- $limit
integer $limit Limit amount
Returns
Implementation of
|
public
Guzzle\Service\Resource\ResourceIteratorInterface
|
#
setPageSize( integer $pageSize )
Attempt to limit the total number of resources retrieved per request by the
iterator.
Attempt to limit the total number of resources retrieved per request by the
iterator.
Parameters
- $pageSize
integer $pageSize Limit amount
Returns
Implementation of
|
public
mixed|null
|
#
get( string $key )
Get an option from the iterator
Get an option from the iterator
Parameters
- $key
string $key Key of the option to retrieve
Returns
mixed|null Returns NULL if not set or the value if set
Implementation of
|
public
Guzzle\Service\Resource\ResourceIterator
|
#
set( string $key, mixed $value )
Set an option on the iterator
Set an option on the iterator
Parameters
- $key
string $key Key of the option to set
- $value
mixed $value Value to set for the option
Returns
Implementation of
|
public
mixed
|
#
current( )
Return the current element.
Return the current element.
Returns
mixed Returns the current element.
Implementation of
|
public
mixed
|
#
key( )
Return the key of the current element.
Return the key of the current element.
Returns
mixed
Implementation of
|
public
integer
|
#
count( )
Return the total number of items that have been retrieved thus far.
Return the total number of items that have been retrieved thus far.
Returns
integer
Implementation of
|
public
integer
|
#
getRequestCount( )
Get the total number of requests sent
Get the total number of requests sent
Returns
integer
|
public
|
#
rewind( )
Rewind the Iterator to the first element and send the original command
Rewind the Iterator to the first element and send the original command
Implementation of
|
public
boolean
|
#
valid( )
Check if there is a current element after calls to rewind() or next().
Check if there is a current element after calls to rewind() or next().
Returns
boolean Returns TRUE if the current element is valid or FALSE
Implementation of
|
public
|
#
next( )
Move forward to next element and may trigger subsequent requests
Move forward to next element and may trigger subsequent requests
Implementation of
|
public
string
|
#
getNextToken( )
Retrieve the NextToken that can be used in other iterators.
Retrieve the NextToken that can be used in other iterators.
Returns
string Returns a NextToken
Implementation of
|
protected
integer
|
#
calculatePageSize( )
Returns the value that should be specified for the page size for a request
that will maintain any hard limits, but still honor the specified pageSize if
the number of items retrieved + pageSize < hard limit
Returns the value that should be specified for the page size for a request
that will maintain any hard limits, but still honor the specified pageSize if
the number of items retrieved + pageSize < hard limit
Returns
integer Returns the page size of the next request.
|
protected
|
#
resetState( )
Reset the internal state of the iterator without triggering a rewind()
Reset the internal state of the iterator without triggering a rewind()
|
abstract protected
array
|
#
sendRequest( )
Send a request to retrieve the next page of results. Hook for subclasses to
implement.
Send a request to retrieve the next page of results. Hook for subclasses to
implement.
Returns
array Returns the newly loaded resources
|
Properties summary
protected
Guzzle\Service\Command\CommandInterface
|
$command
|
|
#
Command used to send requests
Command used to send requests
|
protected
Guzzle\Service\Command\CommandInterface
|
$originalCommand
|
|
|
protected
array
|
$resources
|
|
#
Currently loaded resources
Currently loaded resources
|
protected
integer
|
$retrievedCount
|
0 |
#
Total number of resources that have been retrieved
Total number of resources that have been retrieved
|
protected
integer
|
$iteratedCount
|
0 |
#
Total number of resources that have been iterated
Total number of resources that have been iterated
|
protected
string
|
$nextToken
|
false |
#
NextToken/Marker for a subsequent request
NextToken/Marker for a subsequent request
|
protected
integer
|
$pageSize
|
|
#
Maximum number of resources to fetch per request
Maximum number of resources to fetch per request
|
protected
integer
|
$limit
|
|
#
Maximum number of resources to retrieve in total
Maximum number of resources to retrieve in total
|
protected
integer
|
$requestCount
|
0 |
|
protected
array
|
$data
|
array() |
#
Initial data passed to the constructor
Initial data passed to the constructor
|
protected
boolean
|
$invalid
|
|
#
Whether or not the current value is known to be invalid (e.g. when
sendRequest() returns 0 resources)
Whether or not the current value is known to be invalid (e.g. when
sendRequest() returns 0 resources)
|