1 | <?php |
||
14 | class RouteCollection implements Routable, IteratorAggregate, Dispatchable |
||
15 | { |
||
16 | /** @var \Wandu\Router\RouteCollection[] */ |
||
17 | protected $routers = []; |
||
18 | |||
19 | /** @var \Wandu\Router\Route[] */ |
||
20 | protected $routes = []; |
||
21 | |||
22 | /** @var string */ |
||
23 | protected $prefix; |
||
24 | |||
25 | /** @var array */ |
||
26 | protected $middlewares; |
||
27 | |||
28 | /** @var array */ |
||
29 | protected $domains; |
||
30 | |||
31 | /** |
||
32 | * @param string $prefix |
||
33 | * @param array $middlewares |
||
34 | * @param array $domains |
||
35 | */ |
||
36 | 21 | public function __construct($prefix = '', array $middlewares = [], array $domains = []) |
|
42 | |||
43 | /** |
||
44 | * @return array |
||
45 | */ |
||
46 | 4 | public function toArray() |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 1 | public function prefix(string $prefix, callable $handler) |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function domain($domain, callable $handler) |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | 1 | public function middleware($middleware, callable $handler) |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 7 | public function group(array $attributes, callable $handler) |
|
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function append(callable $handler) |
||
110 | |||
111 | public function resource($className, $except = [], $only = []) |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | 12 | public function get(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
129 | |||
130 | /** |
||
131 | * {@inheritdoc} |
||
132 | */ |
||
133 | 6 | public function post(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
137 | |||
138 | /** |
||
139 | * {@inheritdoc} |
||
140 | */ |
||
141 | 1 | public function put(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
145 | |||
146 | /** |
||
147 | * {@inheritdoc} |
||
148 | */ |
||
149 | 1 | public function delete(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
153 | |||
154 | /** |
||
155 | * {@inheritdoc} |
||
156 | */ |
||
157 | 1 | public function options(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | 1 | public function patch(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | 3 | public function any(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
185 | |||
186 | /** |
||
187 | * {@inheritdoc} |
||
188 | */ |
||
189 | 21 | public function createRoute(array $methods, string $path, string $className, string $methodName = 'index'): RouteFluent |
|
200 | |||
201 | /** |
||
202 | * {@inheritdoc} |
||
203 | */ |
||
204 | 19 | public function getIterator() |
|
215 | |||
216 | /** |
||
217 | * {@inheritdoc} |
||
218 | */ |
||
219 | 15 | public function dispatch(LoaderInterface $loader, ResponsifierInterface $responsifier, ServerRequestInterface $request) |
|
223 | |||
224 | /** |
||
225 | * @return \Wandu\Router\CompiledRouteCollection |
||
226 | */ |
||
227 | 15 | public function compile(): CompiledRouteCollection |
|
269 | } |
||
270 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.