调整基类方法

This commit is contained in:
liaofei 2019-11-19 11:35:02 +08:00
parent a3ae202258
commit 432bbe6904

View File

@ -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));