From dab6de575374171d4e007e3b555f8be77daeb2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 30 Mar 2021 11:34:10 +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 --- Annotation/Route/Route.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Annotation/Route/Route.php b/Annotation/Route/Route.php index 8491cd3a..38fd42d9 100644 --- a/Annotation/Route/Route.php +++ b/Annotation/Route/Route.php @@ -5,6 +5,7 @@ namespace Annotation\Route; use Annotation\Attribute; +use Exception; use HttpServer\Route\Router; use ReflectionException; use Snowflake\Exception\ComponentException; @@ -33,16 +34,16 @@ use Snowflake\Snowflake; /** * @param array $handler * @return Router - * @throws ComponentException * @throws ConfigException - * @throws ReflectionException - * @throws NotFindClassException + * @throws Exception */ public function execute(array $handler): Router { // TODO: Implement setHandler() method. $router = Snowflake::app()->getRouter(); + var_dump($this->uri); + $router->addRoute($this->uri, $handler, $this->method); return $router;