|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($callable, $context=null) | |
| createBatches (\SplQueue $queue) | |
Protected Attributes | |
| $callable | |
| $context | |
Divides batches using a callable
Definition at line 10 of file BatchClosureDivisor.php.
| Guzzle\Batch\BatchClosureDivisor::__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. |
| mixed | $context | Optional context to pass to the batch divisor |
| InvalidArgumentException | if the callable is not callable |
Definition at line 31 of file BatchClosureDivisor.php.
References Guzzle\Batch\BatchClosureDivisor\$callable, and Guzzle\Batch\BatchClosureDivisor\$context.
| Guzzle\Batch\BatchClosureDivisor::createBatches | ( | \SplQueue | $queue | ) |
Divide a queue of items into an array batches
| \SplQueue | $queue | Queue of items to divide into batches. Items are removed as they are iterated. |
Implements Guzzle\Batch\BatchDivisorInterface.
Definition at line 41 of file BatchClosureDivisor.php.
Referenced by Guzzle\Tests\Batch\BatchClosureDivisorTest\testDividesBatch().
|
protected |
Method used to divide the batches
Definition at line 16 of file BatchClosureDivisor.php.
Referenced by Guzzle\Batch\BatchClosureDivisor\__construct().
|
protected |
$context Context passed to the callable
Definition at line 22 of file BatchClosureDivisor.php.
Referenced by Guzzle\Batch\BatchClosureDivisor\__construct().