You are here

public function Braintree_Collection::remove in Commerce Braintree 7

Remove a value from the collection

Parameters

integer $index index to remove:

Throws

OutOfRangeException if index is out of range

1 call to Braintree_Collection::remove()
Braintree_Collection::offsetUnset in braintree_php/lib/Braintree/Collection.php
Unset offset Implements ArrayAccess

File

braintree_php/lib/Braintree/Collection.php, line 57

Class

Braintree_Collection
Generic Collection class

Code

public function remove($index) {
  if ($index >= $this
    ->count()) {
    throw new OutOfRangeException('Index out of range');
  }
  array_splice($this->_collection, $index, 1);
}