Class BatchCommandTransfer
Efficiently transfers multiple commands in parallel per client This class is
to be used with Guzzle\Batch\BatchInterface
- Guzzle\Batch\BatchCommandTransfer implements Guzzle\Batch\BatchTransferInterface, Guzzle\Batch\BatchDivisorInterface
Methods summary
-
public
__construct ( int $batchSize = 50 )
-
public
createBatches ( SplQueue $queue )
Creates batches by grouping commands by their associated client Divide a queue of items into an array batches
-
public
transfer ( array $batch )
Transfer an array of items
Methods detail
Parameters
- $batchSize
integer
$batchSize Size of each batch
Creates batches by grouping commands by their associated client Divide a queue of items into an array batches
Parameters
- $queue
SplQueue
$queue Queue of items to divide into batches. Items are removed as they are iterated.
Returns
Implementation of
Transfer an array of items
Parameters
- $batch
array
$batch Array of items to transfer
Implementation of
Magic methods summary
Properties summary
protected
integer
|
$batchSize |
#
Size of each command batch |