From e71d8e94d7aadf767f7fb89cf24031da62d1aa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 18 Sep 2021 10:49:23 +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 --- http-helper/Route/Router.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-helper/Route/Router.php b/http-helper/Route/Router.php index 9fc520af..873b9d55 100644 --- a/http-helper/Route/Router.php +++ b/http-helper/Route/Router.php @@ -9,6 +9,7 @@ use Exception; use Http\Abstracts\HttpService; use Http\Controller; use Http\Handler\Abstracts\HandlerManager; +use Http\Handler\Handler; use Http\IInterface\MiddlewareInterface; use Http\IInterface\RouterInterface; use JetBrains\PhpStorm\Pure; @@ -107,9 +108,8 @@ class Router extends HttpService implements RouterInterface $path = $this->addPrefix() . '/' . ltrim($path, '/'); - - HandlerManager::add($path, $method, $handler); + HandlerManager::add($path, $method, new Handler($path, $handler)); return null; return $this->tree($path, $handler, $method);