1 | <?php |
||
9 | class RouteExecutor |
||
10 | { |
||
11 | /** |
||
12 | * @param \Wandu\Router\Contracts\LoaderInterface $loader |
||
13 | * @param \Wandu\Router\Contracts\ResponsifierInterface $responsifier |
||
14 | */ |
||
15 | 17 | public function __construct(LoaderInterface $loader, ResponsifierInterface $responsifier) |
|
20 | |||
21 | /** |
||
22 | * @param \Wandu\Router\Contracts\RouteInformation $route |
||
23 | * @param \Psr\Http\Message\ServerRequestInterface $request |
||
24 | * @return \Psr\Http\Message\ResponseInterface |
||
25 | */ |
||
26 | 17 | public function execute(RouteInformation $route, ServerRequestInterface $request) |
|
30 | |||
31 | /** |
||
32 | * @param \Psr\Http\Message\ServerRequestInterface $request |
||
33 | * @param string $className |
||
34 | * @param string $methodName |
||
35 | * @param array $middlewares |
||
36 | * @return \Psr\Http\Message\ResponseInterface |
||
37 | */ |
||
38 | 17 | protected function next(ServerRequestInterface $request, $className, $methodName, array $middlewares = []) |
|
51 | } |
||
52 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: