Documentation

HistoryBatch extends AbstractBatchDecorator
in package

BatchInterface decorator used to keep a history of items that were added to the batch. You must clear the history manually to remove items from the history.

Table of Contents

Properties

$decoratedBatch  : BatchInterface
$history  : array<string|int, mixed>

Methods

__call()  : mixed
Allow decorators to implement custom methods
__construct()  : mixed
add()  : self
Add an item to the queue
clearHistory()  : mixed
Clear the batch history
flush()  : array<string|int, mixed>
Flush the batch and transfer the items
getDecorators()  : array<string|int, mixed>
Trace the decorators associated with the batch
getHistory()  : array<string|int, mixed>
Get the batch history
isEmpty()  : bool
Check if the batch is empty and has further items to transfer

Properties

$history

protected array<string|int, mixed> $history = array()

Items in the history

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
codeCoverageIgnore

add()

Add an item to the queue

public add(mixed $item) : self
Parameters
$item : mixed

Item to add

Return values
self

clearHistory()

Clear the batch history

public clearHistory() : mixed

flush()

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>

getHistory()

Get the batch history

public getHistory() : 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
Return values
bool

        
On this page

Search results