Class Guzzle\Iterator\FilterIterator

InheritanceGuzzle\Iterator\FilterIterator » FilterIterator

Filters values using a callback

Used when PHP 5.4's {@see \CallbackFilterIterator} is not available

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$callback mixed Callback used for filtering Guzzle\Iterator\FilterIterator

Property Details

$callback protected property

Callback used for filtering

protected mixed $callback null

Method Details

__construct() public method

public void __construct ( Iterator $iterator, $callback )
$iterator Iterator

Traversable iterator

$callback array|Closure

Callback used for filtering. Return true to keep or false to filter.

throws Guzzle\Common\Exception\InvalidArgumentException

if the callback if not callable

accept() public method

public void accept ( )