mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
使用新的自动加载机制
preg_replace_callback取代/e模式
This commit is contained in:
@@ -48,7 +48,7 @@ class Image {
|
||||
*/
|
||||
static public function init($type = 'Gd', $imgname = null){
|
||||
/* 引入处理库,实例化图片处理对象 */
|
||||
$class = '\\Think\\Image\\Driver\\'.ucwords($type);
|
||||
$class = '\\Think\\Image\\Driver\\'.strtolower($type);
|
||||
self::$im = new $class($imgname);
|
||||
return self::$im;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class Oauth {
|
||||
* @return object
|
||||
*/
|
||||
static public function connect($type,$options=[]) {
|
||||
$class = 'Think\\Oauth\\Driver\\'.ucwords($type);
|
||||
$class = 'think\\oauth\\driver\\'.strtolower($type);
|
||||
self::$handler = new $class($options);
|
||||
return self::$handler;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class Parser {
|
||||
// 解析内容
|
||||
static public function parse($content,$type){
|
||||
if(!isset(self::$handler[$type])) {
|
||||
$class = '\\Think\\Parser\\Driver\\'.ucwords($type);
|
||||
$class = '\\Think\\Parser\\Driver\\'.strtolower($type);
|
||||
self::$handler[$type] = new $class();
|
||||
}
|
||||
return self::$handler[$type]->parse($content);
|
||||
|
||||
@@ -23,7 +23,7 @@ class Transform {
|
||||
*/
|
||||
static private function init($type){
|
||||
if(!isset(self::$handler[$type])) {
|
||||
$class = '\\Think\\Transform\\Driver\\' . ucwords($type);
|
||||
$class = '\\Think\\Transform\\Driver\\' . strtolower($type);
|
||||
self::$handler[$type] = new $class();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user