| 1 | <?php |
||
| 8 | class PaginationFilter implements FilterInterface |
||
| 9 | { |
||
| 10 | /** @var int $page */ |
||
| 11 | private $page; |
||
| 12 | |||
| 13 | /** @var int $numPerPage */ |
||
| 14 | private $numPerPage; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * PaginationFilter constructor. |
||
| 18 | */ |
||
| 19 | 1 | public function __construct() |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param ArrayIterator $collection |
||
| 28 | * @return ArrayIterator |
||
| 29 | */ |
||
| 30 | public function filter(ArrayIterator $collection): ArrayIterator |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return int |
||
| 58 | */ |
||
| 59 | public function getPage(): int |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param int $page |
||
| 66 | * @return PaginationFilter |
||
| 67 | */ |
||
| 68 | public function setPage(int $page): PaginationFilter |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | public function getNumPerPage(): int |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param int $numPerPage |
||
| 84 | * @return PaginationFilter |
||
| 85 | */ |
||
| 86 | public function setNumPerPage(int $numPerPage): PaginationFilter |
||
| 91 | } |