Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | class RouteParamsRegistry |
||
14 | { |
||
15 | const CONTROLLER_KEY = '_controller'; |
||
16 | |||
17 | const ROUTE_KEY = '_route'; |
||
18 | |||
19 | private $routeParams; |
||
20 | |||
21 | public function getRouteParams(): array |
||
22 | { |
||
23 | if (!isset($this->routeParams)) { |
||
24 | throw new \LogicException('Route params have not been set'); |
||
25 | } |
||
26 | |||
27 | return $this->routeParams; |
||
28 | } |
||
29 | |||
30 | public function setRouteParams(array $routeParams) |
||
33 | } |
||
34 | |||
35 | public function getParameter(string $key): string |
||
42 | } |
||
43 | } |
||
44 |