From c43ce9270c5478d5a22c65fa27cc4f608bc78705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 8 May 2021 11:18:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Router.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index b3816d75..aa56999f 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -31,8 +31,6 @@ class Router extends HttpService implements RouterInterface public array $groupTacks = []; public ?string $dir = 'App\\Http\\Controllers'; - public array $hashMap = []; - const NOT_FOUND = 'Page not found or method not allowed.'; /** @var string[] */ @@ -100,6 +98,7 @@ class Router extends HttpService implements RouterInterface * @param $handler * @param string $method * @return ?Node + * @throws Exception */ public function addRoute($path, $handler, $method = 'any'): ?Node { @@ -159,6 +158,7 @@ class Router extends HttpService implements RouterInterface * @param $handler * @param string $method * @return Node + * @throws Exception */ private function tree($path, $handler, $method = 'any'): Node { @@ -182,6 +182,7 @@ class Router extends HttpService implements RouterInterface * @param array $explode * @param $method * @return Node + * @throws Exception */ private function bindNode(Node $parent, array $explode, $method): Node {