1: <?php
2:
3: namespace Guzzle\Batch;
4:
5: /**
6: * Interface for efficiently transferring items in a queue using batches
7: */
8: interface BatchInterface
9: {
10: /**
11: * Add an item to the queue
12: *
13: * @param mixed $item Item to add
14: *
15: * @return self
16: */
17: public function add($item);
18:
19: /**
20: * Flush the batch and transfer the items
21: *
22: * @return array Returns an array flushed items
23: */
24: public function flush();
25:
26: /**
27: * Check if the batch is empty and has further items to transfer
28: *
29: * @return bool
30: */
31: public function isEmpty();
32: }
33: