使用新的自动加载机制

preg_replace_callback取代/e模式
This commit is contained in:
huangdijia
2015-03-03 18:33:47 +08:00
parent 9e44381f6f
commit 4ef5a0bcba
12 changed files with 44 additions and 29 deletions

View File

@@ -27,7 +27,7 @@ class Cache {
*/
static public function connect($options=[]) {
$type = !empty($options['type'])?$options['type']:'File';
$class = 'think\\cache\\driver\\'.ucwords($type);
$class = 'think\\cache\\driver\\'.strtolower($type);
self::$handler = new $class($options);
return self::$handler;
}