Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
25 | class RoutableRequestHandler implements RequestHandlerInterface |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Server Request attribute name for a route name |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | public const ATTR_NAME_FOR_ROUTE_NAME = '@route-name'; |
||
34 | |||
35 | /** |
||
36 | * The request handler route |
||
37 | * |
||
38 | * @var RouteInterface |
||
39 | */ |
||
40 | private $route; |
||
41 | |||
42 | /** |
||
43 | * Constructor of the class |
||
44 | * |
||
45 | * @param RouteInterface $route |
||
46 | */ |
||
47 | 5 | public function __construct(RouteInterface $route) |
|
48 | { |
||
49 | 5 | $this->route = $route; |
|
50 | 5 | } |
|
51 | |||
52 | /** |
||
53 | * {@inheritDoc} |
||
54 | */ |
||
55 | 4 | public function handle(ServerRequestInterface $request) : ResponseInterface |
|
68 | } |
||
69 | } |
||
70 |