改名
This commit is contained in:
@@ -8,10 +8,7 @@ namespace HttpServer\Route\Dispatch;
|
||||
use Closure;
|
||||
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;
|
||||
|
||||
@@ -51,6 +48,7 @@ class Dispatch
|
||||
/**
|
||||
* @return mixed
|
||||
* 执行函数
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function dispatch(): mixed
|
||||
{
|
||||
|
||||
@@ -56,6 +56,9 @@ class Aop extends Component
|
||||
|
||||
$aopName = get_class($close[0]) . '::' . $close[1];
|
||||
if (!isset($this->_aop[$aopName])) {
|
||||
if (!method_exists($close[0], $close[1])) {
|
||||
return response()->close(404);
|
||||
}
|
||||
return call_user_func($close, ...$get_args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user