1 | <?php |
||
20 | class ElementVoter implements VoterInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var ManagerInterface |
||
24 | */ |
||
25 | private $manager; |
||
26 | |||
27 | /** |
||
28 | * @var Request |
||
29 | */ |
||
30 | private $request; |
||
31 | |||
32 | public function __construct(ManagerInterface $manager) |
||
36 | |||
37 | /** |
||
38 | * @param Request $request |
||
39 | */ |
||
40 | public function setRequest(Request $request) |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | public function matchItem(ItemInterface $item) |
||
76 | |||
77 | /** |
||
78 | * @return bool |
||
79 | */ |
||
80 | private function validateRequestElement() |
||
97 | |||
98 | /** |
||
99 | * @return Element |
||
100 | */ |
||
101 | private function getRequestElement() |
||
105 | |||
106 | /** |
||
107 | * @param Element $element |
||
108 | * @param array $testedRouteParameters |
||
109 | * @return bool |
||
110 | */ |
||
111 | private function isRouteMatchingElement(Element $element, array $testedRouteParameters) |
||
116 | |||
117 | /** |
||
118 | * @param Element $element |
||
119 | * @param array $testedRouteParameters |
||
120 | * @return bool |
||
121 | */ |
||
122 | private function isRouteMatchingElementDirectly(Element $element, array $testedRouteParameters) |
||
130 | |||
131 | /** |
||
132 | * @param Element $element |
||
133 | * @param array $testedRouteParameters |
||
134 | * @return bool |
||
135 | */ |
||
136 | private function isRouteMatchingElementAfterSuccess(Element $element, array $testedRouteParameters) |
||
153 | } |
||
154 |