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 array */ |
||
23 | protected $status; |
||
24 | |||
25 | /** |
||
26 | * @param string $prefix |
||
27 | * @param array $middlewares |
||
28 | * @param array $domains |
||
29 | */ |
||
30 | 18 | public function __construct($prefix = '', $middlewares = [], $domains = []) |
|
38 | |||
39 | /** |
||
40 | * @return array |
||
41 | */ |
||
42 | 4 | public function toArray() |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 1 | public function prefix(string $prefix, callable $handler) |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 1 | public function domain($domain, callable $handler) |
|
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 1 | public function middleware($middleware, callable $handler) |
|
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | 4 | public function group(array $attributes, callable $handler) |
|
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function append(callable $handler) |
||
106 | |||
107 | public function resource($className, $except = [], $only = []) |
||
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | 11 | public function get(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | 6 | public function post(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | 1 | public function put(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | 1 | public function delete(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | 1 | public function options(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | 1 | public function patch(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | 1 | public function any(string $path, string $className, string $methodName = 'index'): RouteFluent |
|
181 | |||
182 | /** |
||
183 | * {@inheritdoc} |
||
184 | */ |
||
185 | 18 | public function createRoute(array $methods, string $path, string $className, string $methodName = 'index'): RouteFluent |
|
196 | |||
197 | /** |
||
198 | * {@inheritdoc} |
||
199 | */ |
||
200 | 18 | public function getIterator() |
|
211 | |||
212 | /** |
||
213 | * {@inheritdoc} |
||
214 | */ |
||
215 | 14 | public function dispatch(LoaderInterface $loader, ResponsifierInterface $responsifier, ServerRequestInterface $request) |
|
219 | |||
220 | /** |
||
221 | * @return \Wandu\Router\CompiledRouteCollection |
||
222 | */ |
||
223 | 14 | public function compile(): CompiledRouteCollection |
|
266 | } |
||
267 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.