public function Braintree_ResourceCollection::valid in Commerce Braintree 7
returns whether the current item is valid when iterating with foreach
File
- braintree_php/
lib/ Braintree/ ResourceCollection.php, line 96
Class
- Braintree_ResourceCollection
- ResourceCollection is a container object for result data
Code
public function valid() {
if ($this->_index == count($this->_items) && $this->_batchIndex < count($this->_ids)) {
$this
->_getNextPage();
}
if ($this->_index < count($this->_items)) {
return true;
}
else {
return false;
}
}