\Guzzle\BatchBatch

Default batch implementation used to convert queued items into smaller chunks of batches using a {@see BatchDivisorIterface} and transfers each batch using a {@see BatchTransferInterface}.

Any exception encountered during a flush operation will throw a \Guzzle\Batch\Exception\BatchTransferException object containing the batch that failed. After an exception is encountered, you can flush the batch again to attempt to finish transferring any previously created batches or queued items.

Summary

Methods
Properties
Constants
__construct()
add()
flush()
isEmpty()
No public properties found
No constants found
createBatches()
$queue
$dividedBatches
$transferStrategy
$divisionStrategy
N/A
No private methods found
No private properties found
N/A

Properties

$queue

$queue : \SplQueue

Type

\SplQueue — Queue of items in the queue

$dividedBatches

$dividedBatches : array

Type

array — Divided batches to be transferred

Methods

add()

add(mixed  $item) : self

Add an item to the queue

Parameters

mixed $item

Item to add

Returns

self

flush()

flush() : array

Flush the batch and transfer the items

Returns

array —

Returns an array flushed items

isEmpty()

isEmpty() : boolean

Check if the batch is empty and has further items to transfer

Returns

boolean

createBatches()

createBatches() 

Create batches for any queued items