mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
视图配置方法config支持获取某个配置的值
This commit is contained in:
@@ -81,7 +81,7 @@ class View
|
||||
* @param string $value 值
|
||||
* @return View
|
||||
*/
|
||||
public function config($config = '', $value = '')
|
||||
public function config($config = '', $value = null)
|
||||
{
|
||||
if (is_array($config)) {
|
||||
foreach ($this->config as $key => $val) {
|
||||
@@ -89,6 +89,9 @@ class View
|
||||
$this->config[$key] = $config[$key];
|
||||
}
|
||||
}
|
||||
} elseif (is_null($value)) {
|
||||
// 获取配置参数
|
||||
return $this->config[$config];
|
||||
} else {
|
||||
$this->config[$config] = $value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user