Class FlushingBatch
BatchInterface decorator used to add automatic flushing of the queue when the size of the queue reaches a threshold.
- Guzzle\Batch\AbstractBatchDecorator implements Guzzle\Batch\BatchInterface
- Guzzle\Batch\FlushingBatch
Methods summary
-
public
__construct ( Guzzle\Batch\BatchInterface $decoratedBatch, int $threshold )
-
public
setThreshold ( int $threshold )
Set the auto-flush threshold
-
public
getThreshold ( )
Get the auto-flush threshold
-
public
add ( mixed $item )
Add an item to the queue
Methods detail
Parameters
- $decoratedBatch
Guzzle\Batch\BatchInterface
$decoratedBatch BatchInterface that is being decorated- $threshold
integer
$threshold Flush when the number in queue matches the threshold
Overrides
Set the auto-flush threshold
Parameters
- $threshold
integer
$threshold The auto-flush threshold
Returns
Get the auto-flush threshold
Returns
integer
Add an item to the queue
Parameters
- $item
mixed
$item Item to add
Returns
Overrides
Methods inherited from Guzzle\Batch\AbstractBatchDecorator
__call()
,
flush()
,
getDecorators()
,
isEmpty()
Magic methods summary
Properties summary
protected
integer
|
$threshold |
#
The threshold for which to automatically flush |
protected
integer
|
$currentTotal |
#
Current number of items known to be in the queue |