1 | <?php |
||
18 | class Route implements ContainerAwareInterface, MiddlewareAwareInterface, StrategyAwareInterface |
||
19 | { |
||
20 | use ContainerAwareTrait; |
||
21 | use MiddlewareAwareTrait; |
||
22 | use RouteConditionTrait; |
||
23 | use StrategyAwareTrait; |
||
24 | |||
25 | /** |
||
26 | * @var string|callable |
||
27 | */ |
||
28 | protected $callable; |
||
29 | |||
30 | /** |
||
31 | * @var \League\Route\RouteGroup |
||
32 | */ |
||
33 | protected $group; |
||
34 | |||
35 | /** |
||
36 | * @var string[] |
||
37 | */ |
||
38 | protected $methods = []; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $path; |
||
44 | |||
45 | /** |
||
46 | * Dispatch the route via the attached strategy. |
||
47 | * |
||
48 | * @param array $vars |
||
49 | * |
||
50 | * @return \League\Route\Middleware\ExecutionChain |
||
51 | */ |
||
52 | 15 | public function getExecutionChain(array $vars) |
|
64 | |||
65 | /** |
||
66 | * Get the callable. |
||
67 | * |
||
68 | * @throws \RuntimeException |
||
69 | * |
||
70 | * @return callable |
||
71 | */ |
||
72 | 33 | public function getCallable() |
|
98 | |||
99 | /** |
||
100 | * Set the callable. |
||
101 | * |
||
102 | * @param string|callable $callable |
||
103 | * |
||
104 | * @return \League\Route\Route |
||
105 | */ |
||
106 | 48 | public function setCallable($callable) |
|
112 | |||
113 | /** |
||
114 | * Get the parent group. |
||
115 | * |
||
116 | * @return \League\Route\RouteGroup |
||
117 | */ |
||
118 | 3 | public function getParentGroup() |
|
122 | |||
123 | /** |
||
124 | * Set the parent group. |
||
125 | * |
||
126 | * @param \League\Route\RouteGroup $group |
||
127 | * |
||
128 | * @return \League\Route\Route |
||
129 | */ |
||
130 | 6 | public function setParentGroup(RouteGroup $group) |
|
136 | |||
137 | /** |
||
138 | * Get the path. |
||
139 | * |
||
140 | * @return string |
||
141 | */ |
||
142 | 27 | public function getPath() |
|
146 | |||
147 | /** |
||
148 | * Set the path. |
||
149 | * |
||
150 | * @param string $path |
||
151 | * |
||
152 | * @return \League\Route\Route |
||
153 | */ |
||
154 | 33 | public function setPath($path) |
|
160 | |||
161 | /** |
||
162 | * Get the methods. |
||
163 | * |
||
164 | * @return string[] |
||
165 | */ |
||
166 | 27 | public function getMethods() |
|
170 | |||
171 | /** |
||
172 | * Get the methods. |
||
173 | * |
||
174 | * @param string[] $methods |
||
175 | * |
||
176 | * @return \League\Route\Route |
||
177 | */ |
||
178 | 33 | public function setMethods(array $methods) |
|
184 | } |
||
185 |