From 62ea2c7d7de3c8b98a1258e58b25aab923b61d93 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 29 Mar 2021 03:17:54 +0800 Subject: [PATCH] modify --- HttpServer/Route/Dispatch/Dispatch.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HttpServer/Route/Dispatch/Dispatch.php b/HttpServer/Route/Dispatch/Dispatch.php index e717e3e9..e66a1692 100644 --- a/HttpServer/Route/Dispatch/Dispatch.php +++ b/HttpServer/Route/Dispatch/Dispatch.php @@ -10,6 +10,7 @@ use HttpServer\Controller; use HttpServer\Http\Context; use HttpServer\Http\Request; use ReflectionException; +use Snowflake\Aop; use Snowflake\Exception\ComponentException; use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; @@ -53,7 +54,9 @@ class Dispatch */ public function dispatch(): mixed { - return call_user_func($this->handler, ...$this->request); + /** @var Aop $aop */ + $aop = Snowflake::app()->get('aop'); + return call_user_func([$aop, 'dispatch'], $this->handler, ...$this->request); }