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

Public Member Functions

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

Protected Attributes

 $batchSize
 

Detailed Description

Batch transfer strategy used to efficiently transfer a batch of requests. This class is to be used with {

See also
Guzzle\Batch\BatchInterface}

Definition at line 14 of file BatchRequestTransfer.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Batch\BatchRequestTransfer::__construct (   $batchSize = 50)

Constructor used to specify how large each batch should be

Parameters
int$batchSizeSize of each batch

Definition at line 27 of file BatchRequestTransfer.php.

References Guzzle\Batch\BatchRequestTransfer\$batchSize.

Member Function Documentation

◆ createBatches()

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

Creates batches of requests by grouping requests by their associated curl multi object. {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 36 of file BatchRequestTransfer.php.

◆ transfer()

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

Transfer an array of items

Parameters
array$batchArray of items to transfer

Implements Guzzle\Batch\BatchTransferInterface.

Definition at line 62 of file BatchRequestTransfer.php.

Field Documentation

◆ $batchSize

int Guzzle\Batch\BatchRequestTransfer::$batchSize
protected

Size of each command batch

Definition at line 20 of file BatchRequestTransfer.php.

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


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