Class Guzzle\Batch\FlushingBatch

InheritanceGuzzle\Batch\FlushingBatch » Guzzle\Batch\AbstractBatchDecorator
ImplementsGuzzle\Batch\BatchInterface

BatchInterface decorator used to add automatic flushing of the queue when the size of the queue reaches a threshold.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$currentTotal int Current number of items known to be in the queue Guzzle\Batch\FlushingBatch
$decoratedBatch Guzzle\Batch\BatchInterface Decorated batch object Guzzle\Batch\AbstractBatchDecorator
$threshold int The threshold for which to automatically flush Guzzle\Batch\FlushingBatch

Property Details

$currentTotal protected property

Current number of items known to be in the queue

protected int $currentTotal 0
$threshold protected property

The threshold for which to automatically flush

protected int $threshold null

Method Details

__construct() public method

public void __construct ( Guzzle\Batch\BatchInterface $decoratedBatch, $threshold )
$decoratedBatch Guzzle\Batch\BatchInterface

BatchInterface that is being decorated

$threshold int

Flush when the number in queue matches the threshold

add() public method

public void add ( $item )
$item
getThreshold() public method

Get the auto-flush threshold

public int getThreshold ( )
setThreshold() public method

Set the auto-flush threshold

public Guzzle\Batch\FlushingBatch setThreshold ( $threshold )
$threshold int

The auto-flush threshold