From 432bbe690456c41e9291fb9241daf6b4b73ba485 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Tue, 19 Nov 2019 11:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9F=BA=E7=B1=BB=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/traits/LogicTrait.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/crmeb/crmeb/traits/LogicTrait.php b/crmeb/crmeb/traits/LogicTrait.php index df37099f..92ac377f 100644 --- a/crmeb/crmeb/traits/LogicTrait.php +++ b/crmeb/crmeb/traits/LogicTrait.php @@ -34,22 +34,6 @@ trait LogicTrait return call_user_func_array([self::$instance,$method],$params); } - /** - * 执行本类的方法 - * @param string $carryoutname 方法名 - * @return boolean - * */ - public static function CarryOut($carryoutname) - { - $methords = get_class_methods(self::class); - if(!in_array($carryoutname,$methords)) return false; - try{ - return (new self)->$carryoutname(); - }catch (\Exception $e){ - return false; - } - } - /** * 配置参数 * @param array $config @@ -162,7 +146,7 @@ trait LogicTrait */ public function __call($method,$ages) { - $keys = array_keys($this->providers); + $keys = property_exists($this,'propsRule') ? array_keys($this->providers) : []; $propsRuleKeys = property_exists($this,'propsRule') ? array_keys($this->propsRule) : []; if (strstr($method,'set') !== false) { $attribute = lcfirst(str_replace('set','',$method));