改名
This commit is contained in:
@@ -82,7 +82,6 @@ class Middleware
|
|||||||
[$controller, $action] = $node->handler;
|
[$controller, $action] = $node->handler;
|
||||||
$attributes = Snowflake::app()->getAttributes();
|
$attributes = Snowflake::app()->getAttributes();
|
||||||
$annotation = $attributes->getByClass(get_class($controller), $action);
|
$annotation = $attributes->getByClass(get_class($controller), $action);
|
||||||
var_dump($annotation);
|
|
||||||
foreach ($annotation as $item) {
|
foreach ($annotation as $item) {
|
||||||
if ($item instanceof Interceptor) {
|
if ($item instanceof Interceptor) {
|
||||||
$node->addInterceptor($item->interceptor);
|
$node->addInterceptor($item->interceptor);
|
||||||
|
|||||||
@@ -439,11 +439,15 @@ class Node extends Application
|
|||||||
return JSON::to(404, $node->_error ?? 'Page not found.');
|
return JSON::to(404, $node->_error ?? 'Page not found.');
|
||||||
}
|
}
|
||||||
$requestParams = func_get_args();
|
$requestParams = func_get_args();
|
||||||
|
try {
|
||||||
if (func_num_args() > 0) {
|
if (func_num_args() > 0) {
|
||||||
return call_user_func($this->callback, ...$requestParams);
|
return call_user_func($this->callback, ...$requestParams);
|
||||||
} else {
|
} else {
|
||||||
return call_user_func($this->callback, \request());
|
return call_user_func($this->callback, \request());
|
||||||
}
|
}
|
||||||
|
} catch (Throwable $exception) {
|
||||||
|
var_dump($exception->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user