| 1 | <?php |
||
| 13 | class ImmutablePaginationAdapter implements PaginationCriteriaInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var PaginationCriteriaInterface |
||
| 17 | */ |
||
| 18 | private $pagination; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param PaginationCriteriaInterface $pagination |
||
| 22 | */ |
||
| 23 | 9 | public function __construct(PaginationCriteriaInterface $pagination) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | */ |
||
| 31 | 3 | public function getPage() |
|
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | 4 | public function getItemsPerPage() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | 4 | public function setPage($page) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * This method will not allow to change items per page. |
||
| 54 | * On each call it will set the same value. |
||
| 55 | * |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | 4 | public function setItemsPerPage($itemsPerPage) |
|
| 66 | |||
| 67 | /** |
||
| 68 | * {@inheritdoc} |
||
| 69 | */ |
||
| 70 | 4 | public function shouldBeApplied() |
|
| 74 | } |
||
| 75 |