diff --git a/wx/Config.php b/wx/Config.php index 644b9d4..8da54d5 100644 --- a/wx/Config.php +++ b/wx/Config.php @@ -396,4 +396,24 @@ class Config return $this->key; } + + /** + * @param array $configs + * @return $this + */ + public function setConfigs(array $configs) + { + foreach ($configs as $key => $val) { + if (empty($val) || is_array($val)) { + continue; + } + if (!property_exists($this, $key)) { + continue; + } + + $this->$key = $val; + } + return $this; + } + }