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

# Class BatchRequestTransfer

Batch transfer strategy used to efficiently transfer a batch of requests. This class is to be used with `Guzzle\Batch\BatchInterface`

  Guzzle\Batch\BatchRequestTransfer implements Guzzle\Batch\BatchTransferInterface, Guzzle\Batch\BatchDivisorInterface

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

## Methods summary

- `public` `__construct ( int $batchSize = 50 )`

  Constructor used to specify how large each batch should be

- `public` `createBatches ( SplQueue $queue )`

  Creates batches of requests by grouping requests by their associated curl multi object. Divide a queue of items into an array batches

- `public` `transfer ( array $batch )`

  Transfer an array of items

## Methods detail

# `public`
`__construct( integer $batchSize = 50 )`

Constructor used to specify how large each batch should be

#### Parameters

$batchSize
  `integer`
  $batchSize Size of each batch

# `public array|`Traversable``
`createBatches( `SplQueue` $queue )`

Creates batches of requests by grouping requests by their associated curl multi object. Divide a queue of items into an array batches

#### Parameters

$queue
  ``SplQueue``
  $queue Queue of items to divide into batches. Items are removed as they are iterated.

#### Returns

`array|`Traversable``
Returns an array or Traversable object that contains arrays of items to transfer

#### Implementation of

`Guzzle\Batch\BatchDivisorInterface::createBatches()`
# `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 integer` | $batchSize | # Size of each command batch