NotifyingBatch
extends AbstractBatchDecorator
in package
BatchInterface decorator used to call a method each time flush is called
Table of Contents
Properties
- $callable : mixed
- $decoratedBatch : BatchInterface
Methods
- __call() : mixed
- Allow decorators to implement custom methods
- __construct() : mixed
- add() : self
- Add an item to the queue
- flush() : array<string|int, mixed>
- Flush the batch and transfer the items
- getDecorators() : array<string|int, mixed>
- Trace the decorators associated with the batch
- isEmpty() : bool
- Check if the batch is empty and has further items to transfer
Properties
$callable
protected
mixed
$callable
Callable to call
$decoratedBatch
protected
BatchInterface
$decoratedBatch
Decorated batch object
Methods
__call()
Allow decorators to implement custom methods
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
-
Missing method name
- $args : array<string|int, mixed>
-
Method arguments
Tags
__construct()
public
__construct(BatchInterface $decoratedBatch, mixed $callable) : mixed
Parameters
- $decoratedBatch : BatchInterface
-
Batch object to decorate
- $callable : mixed
-
Callable to call
Tags
add()
Add an item to the queue
public
add(mixed $item) : self
Parameters
- $item : mixed
-
Item to add
Return values
selfflush()
Flush the batch and transfer the items
public
flush() : array<string|int, mixed>
Return values
array<string|int, mixed> —Returns an array flushed items
getDecorators()
Trace the decorators associated with the batch
public
getDecorators() : array<string|int, mixed>
Return values
array<string|int, mixed>isEmpty()
Check if the batch is empty and has further items to transfer
public
isEmpty() : bool