diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 31b27399..30e59a21 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -321,7 +321,9 @@ class Node extends HttpService if (empty($annotation)) { return $node; } -// var_dump($className, $action, $annotation); + if (str_contains($node->path, 'switch/map')) { + var_dump($className, $action, $annotation); + } foreach ($annotation as $name => $attribute) { if ($attribute instanceof \Annotation\Route\Interceptor) { $node->addInterceptor($attribute->interceptor); @@ -506,9 +508,6 @@ class Node extends HttpService } else { $class = [$class]; } - if (str_contains($this->path,'switch/map')) { - var_dump($class); - } foreach ($class as $closure) { if (is_string($closure)) { $closure = [Snowflake::createObject($closure), 'onHandler']; diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index e8a3c0fe..6f57bada 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -144,6 +144,7 @@ class Router extends HttpService implements RouterInterface if ($first !== '/') { $parent = $this->bindNode($parent, $explode, $method); } + $parent->path = $path; return $parent->bindHandler($handler); }