BatchDivisorInterface.php 510 B

123456789101112131415161718
  1. <?php
  2. namespace Guzzle\Batch;
  3. /**
  4. * Interface used for dividing a queue of items into an array of batches
  5. */
  6. interface BatchDivisorInterface
  7. {
  8. /**
  9. * Divide a queue of items into an array batches
  10. *
  11. * @param \SplQueue $queue Queue of items to divide into batches. Items are removed as they are iterated.
  12. *
  13. * @return array|\Traversable Returns an array or Traversable object that contains arrays of items to transfer
  14. */
  15. public function createBatches(\SplQueue $queue);
  16. }