1 | <?php |
||
17 | class Route implements ImmutableContainerAwareInterface, MiddlewareAwareInterface, StrategyAwareInterface |
||
18 | { |
||
19 | use ImmutableContainerAwareTrait; |
||
20 | use MiddlewareAwareTrait; |
||
21 | use RouteConditionTrait; |
||
22 | use StrategyAwareTrait; |
||
23 | |||
24 | /** |
||
25 | * @var string|callable |
||
26 | */ |
||
27 | protected $callable; |
||
28 | |||
29 | /** |
||
30 | * @var \League\Route\RouteGroup |
||
31 | */ |
||
32 | protected $group; |
||
33 | |||
34 | /** |
||
35 | * @var string[] |
||
36 | */ |
||
37 | protected $methods = []; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $path; |
||
43 | |||
44 | /** |
||
45 | * Dispatch the route via the attached strategy. |
||
46 | * |
||
47 | * @param array $vars |
||
48 | * |
||
49 | * @return \League\Route\Middleware\ExecutionChain |
||
50 | */ |
||
51 | 6 | public function getExecutionChain(array $vars) |
|
55 | |||
56 | /** |
||
57 | * Get the callable. |
||
58 | * |
||
59 | * @throws \RuntimeException |
||
60 | * |
||
61 | * @return callable |
||
62 | */ |
||
63 | 24 | public function getCallable() |
|
89 | |||
90 | /** |
||
91 | * Set the callable. |
||
92 | * |
||
93 | * @param string|callable $callable |
||
94 | * |
||
95 | * @return \League\Route\Route |
||
96 | */ |
||
97 | 39 | public function setCallable($callable) |
|
103 | |||
104 | /** |
||
105 | * Get the parent group. |
||
106 | * |
||
107 | * @return \League\Route\RouteGroup |
||
108 | */ |
||
109 | 3 | public function getParentGroup() |
|
113 | |||
114 | /** |
||
115 | * Set the parent group. |
||
116 | * |
||
117 | * @param \League\Route\RouteGroup $group |
||
118 | * |
||
119 | * @return \League\Route\Route |
||
120 | */ |
||
121 | 6 | public function setParentGroup(RouteGroup $group) |
|
127 | |||
128 | /** |
||
129 | * Get the path. |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | 18 | public function getPath() |
|
137 | |||
138 | /** |
||
139 | * Set the path. |
||
140 | * |
||
141 | * @param string $path |
||
142 | * |
||
143 | * @return \League\Route\Route |
||
144 | */ |
||
145 | 24 | public function setPath($path) |
|
151 | |||
152 | /** |
||
153 | * Get the methods. |
||
154 | * |
||
155 | * @return string[] |
||
156 | */ |
||
157 | 18 | public function getMethods() |
|
161 | |||
162 | /** |
||
163 | * Get the methods. |
||
164 | * |
||
165 | * @param string[] $methods |
||
166 | * |
||
167 | * @return \League\Route\Route |
||
168 | */ |
||
169 | 24 | public function setMethods(array $methods) |
|
175 | } |
||
176 |