Page
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
Page constructor.
Returns true if there are more pages that can be retrieved from the API.
Returns the next page token from the response.
Retrieves the next Page object using the next page token.
Return the number of elements in the response.
Return an iterator over the elements in the response.
Return an iterator over Page objects, beginning with this object.
Gets the request object used to generate the Page.
Gets the API response object.
Details
at line 58
__construct(array $params, callable $callable, PageStreamingDescriptor $pageStreamingDescriptor)
Page constructor.
at line 78
hasNextPage()
Returns true if there are more pages that can be retrieved from the API.
at line 86
getNextPageToken()
Returns the next page token from the response.
at line 95
getNextPage($pageSize = null)
Retrieves the next Page object using the next page token.
at line 128
getPageElementCount()
Return the number of elements in the response.
at line 137
getIterator()
Return an iterator over the elements in the response.
at line 151
Page[]
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 165
Message
getRequestObject()
Gets the request object used to generate the Page.
at line 173
getResponseObject()
Gets the API response object.