Class Guzzle\Batch\BatchClosureDivisor

InheritanceGuzzle\Batch\BatchClosureDivisor
ImplementsGuzzle\Batch\BatchDivisorInterface

Divides batches using a callable

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$callable callable Method used to divide the batches Guzzle\Batch\BatchClosureDivisor
$context mixed Context passed to the callable Guzzle\Batch\BatchClosureDivisor

Property Details

$callable protected property

Method used to divide the batches

protected callable $callable null
$context protected property

Context passed to the callable

protected mixed $context null

Method Details

__construct() public method

public void __construct ( $callable, $context null )
$callable callable

Method used to divide the batches. The method must accept an \SplQueue and return an

                      array of arrays containing the divided items.
$context mixed

Optional context to pass to the batch divisor

throws Guzzle\Common\Exception\InvalidArgumentException

if the callable is not callable

createBatches() public method

public void createBatches ( SplQueue $queue )
$queue