You are here

private function Braintree_ResourceCollection::_getNextPage in Commerce Braintree 7

2 calls to Braintree_ResourceCollection::_getNextPage()
Braintree_ResourceCollection::rewind in braintree_php/lib/Braintree/ResourceCollection.php
rewinds thtestIterateOverResultse collection to the first item when iterating with foreach
Braintree_ResourceCollection::valid in braintree_php/lib/Braintree/ResourceCollection.php
returns whether the current item is valid when iterating with foreach

File

braintree_php/lib/Braintree/ResourceCollection.php, line 114

Class

Braintree_ResourceCollection
ResourceCollection is a container object for result data

Code

private function _getNextPage() {
  if (empty($this->_ids)) {
    $this->_items = array();
  }
  else {
    $this->_items = $this
      ->_getPage(array_slice($this->_ids, $this->_batchIndex, $this->_pageSize));
    $this->_batchIndex += $this->_pageSize;
    $this->_index = 0;
  }
}