取消驱动配置的namespace参数

This commit is contained in:
thinkphp
2016-06-18 23:42:16 +08:00
parent 20eaa4f5b8
commit 30cec3abb1
11 changed files with 12 additions and 14 deletions

View File

@@ -42,7 +42,7 @@ class Config
if (empty($type)) {
$type = pathinfo($config, PATHINFO_EXTENSION);
}
$class = (false === strpos($type, '\\')) ? '\\think\\config\\driver\\' . ucwords($type) : $type;
$class = strpos($type, '\\') ? $type : '\\think\\config\\driver\\' . ucwords($type);
self::set((new $class())->parse($config), $name, $range);
}