NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# 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

Namespace: Guzzle\Batch
Located at Guzzle/Batch/BatchClosureTransfer.php

## Methods summary

- `public` `__construct ( mixed $callable, mixed $context = null )`
- `public` `transfer ( array $batch )`

  Transfer an array of items

## Methods detail

# `public`
`__construct( mixed $callable, mixed $context = null )`

#### 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

``Guzzle\Common\Exception\InvalidArgumentException``
# `public`
`transfer( array $batch )`

Transfer an array of items

#### Parameters

$batch
  `array`
  $batch Array of items to transfer

#### Implementation of

`Guzzle\Batch\BatchTransferInterface::transfer()`

### Magic methods summary

## Properties summary

`protected callable` | $callable | # A closure that performs the transfer
`protected mixed` | $context | # $context Context passed to the callable