From a59be5976f858e2897fdb24e9234bb82a23aed0f Mon Sep 17 00:00:00 2001 From: as2252258 Date: Thu, 19 Jul 2018 19:29:06 +0800 Subject: [PATCH] add --- wx/Base.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wx/Base.php b/wx/Base.php index f9ffa7d..74e5d43 100644 --- a/wx/Base.php +++ b/wx/Base.php @@ -112,24 +112,18 @@ abstract class Base protected static $base; /** - * @param $method * @param $configPath - * @param mixed ...$params - * @return mixed + * @return static * @throws \Exception */ - public static function call($method, $configPath, ...$params) + public static function call($configPath) { if (!static::$base instanceof Base) { static::$base = new static(); } $class = static::$base; $class->loadConfig($configPath); - - if (!method_exists($class, $method)) { - throw new \Exception('未知的执行方法!'); - } - return call_user_func([$class, $method], ...$params); + return $class; }