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); }