1 | <?php |
||
13 | final class SortUriManager implements SortUriManagerInterface |
||
14 | { |
||
15 | use OptionsTrait; |
||
16 | |||
17 | public const OPT_SORT_QUERY_PARAM = 'query_param'; |
||
18 | |||
19 | /** |
||
20 | * @var PagerUriManagerInterface |
||
21 | */ |
||
22 | private $pagerUriManager; |
||
23 | |||
24 | /** |
||
25 | * SortUriManager constructor. |
||
26 | * @param array $options |
||
27 | * @param PagerUriManagerInterface|null $pagerUriManager |
||
28 | */ |
||
29 | public function __construct(array $options = [], PagerUriManagerInterface $pagerUriManager = null) |
||
39 | |||
40 | /** |
||
41 | * @inheritDoc |
||
42 | */ |
||
43 | public function getAppliedSorts(UriInterface $uri): array |
||
55 | |||
56 | /** |
||
57 | * @param UriInterface $uri |
||
58 | * @param array $sorts |
||
59 | * @return UriInterface |
||
60 | * @throws \InvalidArgumentException |
||
61 | * @throws \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException |
||
62 | */ |
||
63 | public function buildSortUri(UriInterface $uri, array $sorts): UriInterface |
||
83 | |||
84 | /** |
||
85 | * @param array $sorts |
||
86 | * @return array |
||
87 | */ |
||
88 | private function normalizeSorts(array $sorts): array |
||
105 | } |
||
106 |