改名
This commit is contained in:
@@ -321,7 +321,9 @@ class Node extends HttpService
|
|||||||
if (empty($annotation)) {
|
if (empty($annotation)) {
|
||||||
return $node;
|
return $node;
|
||||||
}
|
}
|
||||||
// var_dump($className, $action, $annotation);
|
if (str_contains($node->path, 'switch/map')) {
|
||||||
|
var_dump($className, $action, $annotation);
|
||||||
|
}
|
||||||
foreach ($annotation as $name => $attribute) {
|
foreach ($annotation as $name => $attribute) {
|
||||||
if ($attribute instanceof \Annotation\Route\Interceptor) {
|
if ($attribute instanceof \Annotation\Route\Interceptor) {
|
||||||
$node->addInterceptor($attribute->interceptor);
|
$node->addInterceptor($attribute->interceptor);
|
||||||
@@ -506,9 +508,6 @@ class Node extends HttpService
|
|||||||
} else {
|
} else {
|
||||||
$class = [$class];
|
$class = [$class];
|
||||||
}
|
}
|
||||||
if (str_contains($this->path,'switch/map')) {
|
|
||||||
var_dump($class);
|
|
||||||
}
|
|
||||||
foreach ($class as $closure) {
|
foreach ($class as $closure) {
|
||||||
if (is_string($closure)) {
|
if (is_string($closure)) {
|
||||||
$closure = [Snowflake::createObject($closure), 'onHandler'];
|
$closure = [Snowflake::createObject($closure), 'onHandler'];
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ class Router extends HttpService implements RouterInterface
|
|||||||
if ($first !== '/') {
|
if ($first !== '/') {
|
||||||
$parent = $this->bindNode($parent, $explode, $method);
|
$parent = $this->bindNode($parent, $explode, $method);
|
||||||
}
|
}
|
||||||
|
$parent->path = $path;
|
||||||
return $parent->bindHandler($handler);
|
return $parent->bindHandler($handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user