mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
改进App类invokeMethod方法
This commit is contained in:
@@ -222,7 +222,7 @@ class App
|
|||||||
public static function invokeMethod($method, $vars = [])
|
public static function invokeMethod($method, $vars = [])
|
||||||
{
|
{
|
||||||
if (is_array($method)) {
|
if (is_array($method)) {
|
||||||
$class = is_object($method[0]) ? $method[0] : new $method[0](Request::instance());
|
$class = is_object($method[0]) ? $method[0] : self::invokeClass($method[0]);
|
||||||
$reflect = new \ReflectionMethod($class, $method[1]);
|
$reflect = new \ReflectionMethod($class, $method[1]);
|
||||||
} else {
|
} else {
|
||||||
// 静态方法
|
// 静态方法
|
||||||
|
|||||||
Reference in New Issue
Block a user