class Page implements IteratorAggregate

A Page object wraps an API list method response and provides methods to retrieve additional pages using the page token.

Constants

FINAL_PAGE_TOKEN

Methods

__construct($params, $callable, $pageStreamingDescriptor)

No description

hasNextPage()

Returns true if there are more pages that can be retrieved from the API.

getNextPageToken()

Returns the next page token from the response.

getNextPage($pageSize = null)

Retrieves the next Page object using the next page token.

getPageElementCount()

Return the number of elements in the response.

getIterator()

Return an iterator over the elements in the response.

iteratePages()

Return an iterator over Page objects, beginning with this object.

getRequestObject()

Gets the request object used to generate the Page.

getResponseObject()

Gets the API response object.

Details

at line line 52
__construct($params, $callable, $pageStreamingDescriptor)

Parameters

$params
$callable
$pageStreamingDescriptor

at line line 72
hasNextPage()

Returns true if there are more pages that can be retrieved from the API.

at line line 80
getNextPageToken()

Returns the next page token from the response.

at line line 89
getNextPage($pageSize = null)

Retrieves the next Page object using the next page token.

Parameters

$pageSize

at line line 122
getPageElementCount()

Return the number of elements in the response.

at line line 131
getIterator()

Return an iterator over the elements in the response.

at line line 144
iteratePages()

Return an iterator over Page objects, beginning with this object.

Additional Page objects are retrieved lazily via API calls until all elements have been retrieved.

at line line 157
getRequestObject()

Gets the request object used to generate the Page.

at line line 165
getResponseObject()

Gets the API response object.