modify
This commit is contained in:
@@ -54,9 +54,7 @@ class Dispatch
|
||||
*/
|
||||
public function dispatch(): mixed
|
||||
{
|
||||
/** @var Aop $aop */
|
||||
$aop = Snowflake::app()->get('aop');
|
||||
return call_user_func([$aop, 'dispatch'], $this->handler, ...$this->request);
|
||||
return \aop($this->handler, $this->request);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -298,6 +298,21 @@ if (!function_exists('fire')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aop')) {
|
||||
|
||||
|
||||
/**
|
||||
* @param string $event
|
||||
* @param array $params
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
function aop(mixed $handler, array $params = [])
|
||||
{
|
||||
return Snowflake::app()->get('aop')->dispatch($handler, ...$params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('objectPool')) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user