Open Journal Systems  3.3.0
Guzzle\Batch\BatchCommandTransfer Class Reference
Inheritance diagram for Guzzle\Batch\BatchCommandTransfer:
Guzzle\Batch\BatchTransferInterface Guzzle\Batch\BatchDivisorInterface

Public Member Functions

 __construct ($batchSize=50)
 
 createBatches (\SplQueue $queue)
 
 transfer (array $batch)
 

Protected Attributes

 $batchSize
 

Detailed Description

Efficiently transfers multiple commands in parallel per client This class is to be used with {

See also
Guzzle\Batch\BatchInterface}

Definition at line 15 of file BatchCommandTransfer.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Batch\BatchCommandTransfer::__construct (   $batchSize = 50)
Parameters
int$batchSizeSize of each batch

Definition at line 26 of file BatchCommandTransfer.php.

References Guzzle\Batch\BatchCommandTransfer\$batchSize.

Member Function Documentation

◆ createBatches()

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

Creates batches by grouping commands by their associated client {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
}

Implements Guzzle\Batch\BatchDivisorInterface.

Definition at line 35 of file BatchCommandTransfer.php.

◆ transfer()

Guzzle\Batch\BatchCommandTransfer::transfer ( array  $batch)

Transfer an array of items

Parameters
array$batchArray of items to transfer

Implements Guzzle\Batch\BatchTransferInterface.

Definition at line 58 of file BatchCommandTransfer.php.

Field Documentation

◆ $batchSize

int Guzzle\Batch\BatchCommandTransfer::$batchSize
protected

Size of each command batch

Definition at line 21 of file BatchCommandTransfer.php.

Referenced by Guzzle\Batch\BatchCommandTransfer\__construct().


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