Documentation

BatchClosureTransfer
in package
implements BatchTransferInterface

Batch transfer strategy where transfer logic can be defined via a Closure.

This class is to be used with BatchInterface

Table of Contents

Interfaces

BatchTransferInterface
Interface used for transferring batches of items

Properties

$callable  : callable
$context  : mixed

Methods

__construct()  : mixed
transfer()  : mixed
Transfer an array of items

Properties

Methods

__construct()

public __construct(mixed $callable[, mixed $context = null ]) : mixed
Parameters
$callable : mixed

Callable that performs the transfer. This function should accept two arguments: (array $batch, mixed $context).

$context : mixed = null

Optional context to pass to the batch divisor

Tags
throws
InvalidArgumentException

transfer()

Transfer an array of items

public transfer(array<string|int, mixed> $batch) : mixed
Parameters
$batch : array<string|int, mixed>

Array of items to transfer


        
On this page

Search results