Open Journal Systems  3.3.0
Guzzle\Batch\AbstractBatchDecorator Class Reference
Inheritance diagram for Guzzle\Batch\AbstractBatchDecorator:
Guzzle\Batch\BatchInterface Guzzle\Batch\ExceptionBufferingBatch Guzzle\Batch\FlushingBatch Guzzle\Batch\HistoryBatch Guzzle\Batch\NotifyingBatch

Public Member Functions

 __call ($method, array $args)
 
 __construct (BatchInterface $decoratedBatch)
 
 add ($item)
 
 flush ()
 
 getDecorators ()
 
 isEmpty ()
 

Protected Attributes

 $decoratedBatch
 

Detailed Description

Abstract decorator used when decorating a BatchInterface

Definition at line 8 of file AbstractBatchDecorator.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Batch\AbstractBatchDecorator::__construct ( BatchInterface  $decoratedBatch)
Parameters
BatchInterface$decoratedBatchBatchInterface that is being decorated

Definition at line 19 of file AbstractBatchDecorator.php.

References Guzzle\Batch\AbstractBatchDecorator\$decoratedBatch.

Member Function Documentation

◆ __call()

Guzzle\Batch\AbstractBatchDecorator::__call (   $method,
array  $args 
)

Allow decorators to implement custom methods

Parameters
string$methodMissing method name
array$argsMethod arguments
Returns
mixed @codeCoverageIgnore

Definition at line 33 of file AbstractBatchDecorator.php.

◆ add()

Guzzle\Batch\AbstractBatchDecorator::add (   $item)

Add an item to the queue

Parameters
mixed$itemItem to add
Returns
self

Implements Guzzle\Batch\BatchInterface.

Reimplemented in Guzzle\Batch\FlushingBatch, and Guzzle\Batch\HistoryBatch.

Definition at line 38 of file AbstractBatchDecorator.php.

Referenced by Guzzle\Tests\Batch\NotifyingBatchTest\testNotifiesAfterFlush().

◆ flush()

Guzzle\Batch\AbstractBatchDecorator::flush ( )

Flush the batch and transfer the items

Returns
array Returns an array flushed items

Implements Guzzle\Batch\BatchInterface.

Reimplemented in Guzzle\Batch\NotifyingBatch, and Guzzle\Batch\ExceptionBufferingBatch.

Definition at line 45 of file AbstractBatchDecorator.php.

◆ getDecorators()

Guzzle\Batch\AbstractBatchDecorator::getDecorators ( )

Trace the decorators associated with the batch

Returns
array

Definition at line 60 of file AbstractBatchDecorator.php.

◆ isEmpty()

Guzzle\Batch\AbstractBatchDecorator::isEmpty ( )

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

Returns
bool

Implements Guzzle\Batch\BatchInterface.

Definition at line 50 of file AbstractBatchDecorator.php.

Field Documentation

◆ $decoratedBatch

BatchInterface Guzzle\Batch\AbstractBatchDecorator::$decoratedBatch
protected

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