改名
This commit is contained in:
@@ -56,14 +56,14 @@ abstract class Handler implements RequestHandlerInterface
|
|||||||
protected function dispatcher(): mixed
|
protected function dispatcher(): mixed
|
||||||
{
|
{
|
||||||
if ($this->handler->callback instanceof \Closure) {
|
if ($this->handler->callback instanceof \Closure) {
|
||||||
return call_user_func($this->handler->callback, ...$this->handler->params);
|
$response = call_user_func($this->handler->callback, ...$this->handler->params);
|
||||||
|
} else {
|
||||||
}
|
|
||||||
[$controller, $action] = $this->handler->callback;
|
[$controller, $action] = $this->handler->callback;
|
||||||
|
|
||||||
$controller = Kiri::getDi()->get($controller);
|
$controller = Kiri::getDi()->get($controller);
|
||||||
|
|
||||||
$response = call_user_func([$controller, $action], ...$this->handler->params);
|
$response = call_user_func([$controller, $action], ...$this->handler->params);
|
||||||
|
}
|
||||||
if (!($response instanceof ResponseInterface)) {
|
if (!($response instanceof ResponseInterface)) {
|
||||||
$response = $this->transferToResponse($response);
|
$response = $this->transferToResponse($response);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user