\Guzzle\BatchBatchClosureTransfer

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

This class is to be used with \Guzzle\Batch\Guzzle\Batch\BatchInterface

Summary

Methods
Properties
Constants
__construct()
transfer()
No public properties found
No constants found
No protected methods found
$callable
$context
N/A
No private methods found
No private properties found
N/A

Properties

$callable

$callable : callable

Type

callable — A closure that performs the transfer

$context

$context : mixed

Type

mixed — Context passed to the callable

Methods

__construct()

__construct(mixed  $callable, mixed  $context = null) 

Parameters

mixed $callable

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

mixed $context

Optional context to pass to the batch divisor

Throws

\Guzzle\Common\Exception\InvalidArgumentException

transfer()

transfer(array  $batch) 

Transfer an array of items

Parameters

array $batch

Array of items to transfer