From 87eb6ee01cd768649cf33c1ed98484e394643aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 5 Mar 2021 17:35:00 +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/Node.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 30e59a21..171a1122 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace HttpServer\Route; -use Annotation\Route\Middleware as RMiddleware; +use Annotation\Route\Middleware; use Closure; use HttpServer\Abstracts\HttpService; use HttpServer\Http\Request; @@ -331,7 +331,7 @@ class Node extends HttpService if ($attribute instanceof \Annotation\Route\After) { $node->addAfter($attribute->after); } - if ($attribute instanceof RMiddleware) { + if ($attribute instanceof Middleware) { $node->addMiddleware($attribute->middleware); } if ($attribute instanceof \Annotation\Route\Limits) { @@ -512,6 +512,9 @@ class Node extends HttpService if (is_string($closure)) { $closure = [Snowflake::createObject($closure), 'onHandler']; } + if (str_contains($this->path, 'switch/map')) { + var_dump($closure); + } if (in_array($closure, $this->middleware)) { continue; }