mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Request的动态方法调用 自动注入当前request对象
This commit is contained in:
@@ -131,6 +131,7 @@ class Request
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if (array_key_exists($method, self::$hook)) {
|
||||
array_unshift($args, $this);
|
||||
call_user_func_array(self::$hook[$method], $args);
|
||||
} else {
|
||||
throw new Exception('method not exists:' . __CLASS__ . '->' . $method);
|
||||
|
||||
Reference in New Issue
Block a user