Interface Guzzle\Batch\BatchDivisorInterface

Implemented byGuzzle\Batch\BatchClosureDivisor, Guzzle\Batch\BatchCommandTransfer, Guzzle\Batch\BatchRequestTransfer, Guzzle\Batch\BatchSizeDivisor

Interface used for dividing a queue of items into an array of batches

Public Methods

Hide inherited methods

MethodDescriptionDefined By
createBatches() Divide a queue of items into an array batches Guzzle\Batch\BatchDivisorInterface

Method Details

createBatches() public abstract method

Divide a queue of items into an array batches

public abstract array|Traversable createBatches ( SplQueue $queue )
$queue SplQueue

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

return array|Traversable

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