1 | <?php |
||
9 | class Router |
||
10 | { |
||
11 | /* @var array<Routable> */ |
||
12 | private $routes; |
||
13 | |||
14 | public function __construct() |
||
18 | |||
19 | public function addRoute(Routable $routable) : void |
||
23 | |||
24 | /** |
||
25 | * @return array |
||
26 | */ |
||
27 | public function getRoutes() : array |
||
31 | |||
32 | /** |
||
33 | * @param ServerRequestInterface $serverRequest |
||
34 | * @return mixed TODO: should be Routable but php-psalm throwing errors. |
||
35 | * @throws RouteNotFoundException |
||
36 | */ |
||
37 | public function resolve(ServerRequestInterface $serverRequest) |
||
48 | } |
||
49 |