This commit is contained in:
2020-12-16 16:32:05 +08:00
parent a272edcca5
commit d75860d2ec
3 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -47,10 +47,10 @@ class OnRequest extends Callback
/** /**
* @param Request $request * @param Request $request
* @param Response $response * @param Response $response
* @return false|int|mixed|string|void * @return mixed
* @throws Exception * @throws ComponentException
*/ */
public function onRequest(Request $request, Response $response) public function onRequest(Request $request, Response $response): mixed
{ {
try { try {
/** @var HRequest $sRequest */ /** @var HRequest $sRequest */
+4
View File
@@ -228,6 +228,7 @@ class Node extends Application
$handler = [$handler]; $handler = [$handler];
} }
foreach ($handler as $closure) { foreach ($handler as $closure) {
var_dump($closure);
$this->_interceptors[] = $closure; $this->_interceptors[] = $closure;
} }
$this->restructure(); $this->restructure();
@@ -244,6 +245,7 @@ class Node extends Application
$handler = [$handler]; $handler = [$handler];
} }
foreach ($handler as $closure) { foreach ($handler as $closure) {
var_dump($closure);
$this->_after[] = $closure; $this->_after[] = $closure;
} }
$this->restructure(); $this->restructure();
@@ -260,6 +262,7 @@ class Node extends Application
$handler = [$handler]; $handler = [$handler];
} }
foreach ($handler as $closure) { foreach ($handler as $closure) {
var_dump($closure);
$this->_limits[] = $closure; $this->_limits[] = $closure;
} }
$this->restructure(); $this->restructure();
@@ -407,6 +410,7 @@ class Node extends Application
$class = [$class]; $class = [$class];
} }
foreach ($class as $closure) { foreach ($class as $closure) {
var_dump($closure);
$this->middleware[] = $closure; $this->middleware[] = $closure;
} }
$this->restructure(); $this->restructure();
+2 -2
View File
@@ -234,10 +234,10 @@ class Logger extends Component
/** /**
* @param Throwable $exception * @param Throwable $exception
* @return false|int|mixed|string * @return mixed
* @throws Exception * @throws Exception
*/ */
public function exception(Throwable $exception) public function exception(Throwable $exception): mixed
{ {
$errorInfo = [ $errorInfo = [
'message' => $exception->getMessage(), 'message' => $exception->getMessage(),