| 1 | <?php |
||
| 10 | class LimitFilter implements FilterInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var int The number of documents to return |
||
| 14 | */ |
||
| 15 | private $count; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int The offset of the first document to return |
||
| 19 | */ |
||
| 20 | private $offset; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Set limit clause |
||
| 24 | * |
||
| 25 | * @param int $count The number of documents to return |
||
| 26 | * @param int $offset The offset of the first document to return |
||
| 27 | */ |
||
| 28 | public function __construct(int $count, int $offset = 0) |
||
| 33 | |||
| 34 | public function filter(\Traversable $documents): \Generator |
||
| 52 | } |
||
| 53 |