mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
invoke自动注入方法传入当前请求对象
This commit is contained in:
@@ -283,7 +283,7 @@ class App
|
|||||||
if (method_exists($className, 'invoke')) {
|
if (method_exists($className, 'invoke')) {
|
||||||
$method = new \ReflectionMethod($className, 'invoke');
|
$method = new \ReflectionMethod($className, 'invoke');
|
||||||
if ($method->isPublic() && $method->isStatic()) {
|
if ($method->isPublic() && $method->isStatic()) {
|
||||||
$args[] = $className::invoke();
|
$args[] = $className::invoke(Request::instance());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user