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

# Interface BatchInterface

Interface for efficiently transferring items in a queue using batches

### Direct known implementers

`Guzzle\Batch\AbstractBatchDecorator`, `Guzzle\Batch\Batch`

### Indirect known implementers

`Aws\DynamoDb\Model\BatchRequest\WriteRequestBatch`, `Aws\S3\Model\DeleteObjectsBatch`, `Guzzle\Batch\ExceptionBufferingBatch`, `Guzzle\Batch\FlushingBatch`, `Guzzle\Batch\HistoryBatch`, `Guzzle\Batch\NotifyingBatch`

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

## Methods summary

- `public` `add ( mixed $item )`

  Add an item to the queue

- `public` `flush ( )`

  Flush the batch and transfer the items

- `public` `isEmpty ( )`

  Check if the batch is empty and has further items to transfer

## Methods detail

# `public `Guzzle\Batch\BatchInterface``
`add( mixed $item )`

Add an item to the queue

#### Parameters

$item
  `mixed`
  $item Item to add

#### Returns

``Guzzle\Batch\BatchInterface``
# `public array`
`flush( )`

Flush the batch and transfer the items

#### Returns

`array`
Returns an array flushed items
# `public boolean`
`isEmpty( )`

Check if the batch is empty and has further items to transfer

#### Returns

`boolean`

### Magic methods summary