\Guzzle\BatchBatchCommandTransfer

Efficiently transfers multiple commands in parallel per client This class is to be used with {@see Guzzle\Batch\BatchInterface}

Summary

Methods
Properties
Constants
__construct()
createBatches()
transfer()
No public properties found
No constants found
No protected methods found
$batchSize
N/A
No private methods found
No private properties found
N/A

Properties

$batchSize

$batchSize : integer

Type

integer — Size of each command batch

Methods

__construct()

__construct(integer  $batchSize = 50) 

Parameters

integer $batchSize

Size of each batch

createBatches()

createBatches(\SplQueue  $queue) : array|\Traversable

Creates batches by grouping commands by their associated client {@inheritdoc}

Parameters

\SplQueue $queue

Queue of items to divide into batches. Items are removed as they are iterated.

Returns

array|\Traversable —

Returns an array or Traversable object that contains arrays of items to transfer

transfer()

transfer(array  $batch) 

Transfer an array of items

Parameters

array $batch

Array of items to transfer