1 | <?php |
||
14 | class ImmutablePaginationAdapter implements PaginationCriteriaInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var PaginationCriteriaInterface |
||
18 | */ |
||
19 | private $pagination; |
||
20 | |||
21 | /** |
||
22 | * @param PaginationCriteriaInterface $pagination |
||
23 | */ |
||
24 | 11 | public function __construct(PaginationCriteriaInterface $pagination) |
|
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 3 | public function getPage(): int |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | 4 | public function getItemsPerPage(): int |
|
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | 4 | public function setPage(int $page = null) |
|
52 | |||
53 | /** |
||
54 | * This method will not allow to change items per page. |
||
55 | * On each call it will set the same value. |
||
56 | * |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 4 | public function setItemsPerPage(int $itemsPerPage = null) |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 6 | public function shouldBeApplied(): bool |
|
75 | } |
||
76 |