summaryrefslogtreecommitdiff
path: root/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchDivisorInterface.php
blob: 0214f05f4a0fd324539300b357d12bd7b61b492e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace Guzzle\Batch;

/**
 * Interface used for dividing a queue of items into an array of batches
 */
interface BatchDivisorInterface
{
    /**
     * Divide a queue of items into an array batches
     *
     * @param \SplQueue $queue Queue of items to divide into batches. Items are removed as they are iterated.
     *
     * @return array|\Traversable Returns an array or Traversable object that contains arrays of items to transfer
     */
    public function createBatches(\SplQueue $queue);
}