This commit is contained in:
2023-04-19 12:35:39 +08:00
parent a16bb3a19c
commit aa8fb228cc
12 changed files with 151 additions and 55 deletions
+1 -7
View File
@@ -62,13 +62,7 @@ class Handler implements RequestHandlerInterface
public function handle(ServerRequestInterface $request): ResponseInterface
{
// TODO: Implement handle() method.
$result = call_user_func($this->handler, ...$this->parameter);
if ($result instanceof ResponseInterface) {
return $result;
} else {
$response = \Kiri::getDi()->get(ResponseInterface::class);
return $response->rewrite();
}
return call_user_func($this->handler, ...$this->parameter);
}
}