Class BatchClosureTransfer
Batch transfer strategy where transfer logic can be defined via a Closure.
This class is to be used with Guzzle\Batch\BatchInterface
- Guzzle\Batch\BatchClosureTransfer implements Guzzle\Batch\BatchTransferInterface
Methods summary
-
public
__construct ( mixed $callable, mixed $context = null )
-
public
transfer ( array $batch )
Transfer an array of items
Methods detail
Parameters
- $callable
mixed
$callable Callable that performs the transfer. This function should accept two arguments: (array $batch, mixed $context).- $context
mixed
$context Optional context to pass to the batch divisor
Throws
Transfer an array of items
Parameters
- $batch
array
$batch Array of items to transfer
Implementation of
Magic methods summary
Properties summary
protected
callable
|
$callable |
#
A closure that performs the transfer |
protected
mixed
|
$context |
#
$context Context passed to the callable |