Class Guzzle\Batch\BatchClosureTransfer

InheritanceGuzzle\Batch\BatchClosureTransfer
ImplementsGuzzle\Batch\BatchTransferInterface

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

This class is to be used with {@see Guzzle\Batch\BatchInterface}

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$callable callable A closure that performs the transfer Guzzle\Batch\BatchClosureTransfer
$context mixed Context passed to the callable Guzzle\Batch\BatchClosureTransfer

Property Details

$callable protected property

A closure that performs the transfer

protected callable $callable null
$context protected property

Context passed to the callable

protected mixed $context null

Method Details

__construct() public method

public void __construct ( $callable, $context null )
$callable mixed

Callable that performs the transfer. This function should accept two arguments:

                   (array $batch, mixed $context).
$context mixed

Optional context to pass to the batch divisor

throws Guzzle\Common\Exception\InvalidArgumentException
transfer() public method

public void transfer ( array $batch )
$batch