改名
This commit is contained in:
@@ -438,6 +438,7 @@ class Node extends Application
|
|||||||
if (empty($this->callback)) {
|
if (empty($this->callback)) {
|
||||||
return JSON::to(404, $node->_error ?? 'Page not found.');
|
return JSON::to(404, $node->_error ?? 'Page not found.');
|
||||||
}
|
}
|
||||||
|
var_dump($this->callback);
|
||||||
$requestParams = func_get_args();
|
$requestParams = func_get_args();
|
||||||
if (func_num_args() > 0) {
|
if (func_num_args() > 0) {
|
||||||
return call_user_func($this->callback, ...$requestParams);
|
return call_user_func($this->callback, ...$requestParams);
|
||||||
|
|||||||
@@ -481,13 +481,12 @@ class Router extends Application implements RouterInterface
|
|||||||
return send(self::NOT_FOUND, 404);
|
return send(self::NOT_FOUND, 404);
|
||||||
}
|
}
|
||||||
send($node->dispatch(), 200);
|
send($node->dispatch(), 200);
|
||||||
// if ($node->hasAfter()) {
|
if ($node->hasAfter()) {
|
||||||
// $node->afterDispatch(\request());
|
$node->afterDispatch(\request());
|
||||||
// }
|
}
|
||||||
} catch (ExitException $exception) {
|
} catch (ExitException $exception) {
|
||||||
send($exception->getMessage(), $exception->getCode());
|
send($exception->getMessage(), $exception->getCode());
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
var_dump($exception->getMessage());
|
|
||||||
send($this->exception($exception), 200);
|
send($this->exception($exception), 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user