Open Journal Systems  3.3.0
Guzzle\Batch\BatchDivisorInterface Interface Reference
Inheritance diagram for Guzzle\Batch\BatchDivisorInterface:
Guzzle\Batch\BatchClosureDivisor Guzzle\Batch\BatchCommandTransfer Guzzle\Batch\BatchRequestTransfer Guzzle\Batch\BatchSizeDivisor

Public Member Functions

 createBatches (\SplQueue $queue)
 

Detailed Description

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

Definition at line 8 of file BatchDivisorInterface.php.

Member Function Documentation

◆ createBatches()

Guzzle\Batch\BatchDivisorInterface::createBatches ( \SplQueue  $queue)

Divide a queue of items into an array batches

Parameters
\SplQueue$queueQueue 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

Implemented in Guzzle\Batch\BatchSizeDivisor, Guzzle\Batch\BatchClosureDivisor, Guzzle\Batch\BatchRequestTransfer, and Guzzle\Batch\BatchCommandTransfer.


The documentation for this interface was generated from the following file: