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

# Class BatchSizeDivisor

Divides batches into smaller batches under a certain size

  Guzzle\Batch\BatchSizeDivisor implements Guzzle\Batch\BatchDivisorInterface

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

## Methods summary

- `public` `__construct ( int $size )`
- `public` `setSize ( int $size )`

  Set the size of each batch

- `public` `getSize ( )`

  Get the size of each batch

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

  Divide a queue of items into an array batches

## Methods detail

# `public`
`__construct( integer $size )`

#### Parameters

$size
  `integer`
  $size Size of each batch

# `public `Guzzle\Batch\BatchSizeDivisor``
`setSize( integer $size )`

Set the size of each batch

#### Parameters

$size
  `integer`
  $size Size of each batch

#### Returns

``Guzzle\Batch\BatchSizeDivisor``
# `public integer`
`getSize( )`

Get the size of each batch

#### Returns

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

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()`

### Magic methods summary

## Properties summary

`protected integer` | $size | # Size of each batch