diff --git a/library/think/app.php b/library/think/App.php similarity index 100% rename from library/think/app.php rename to library/think/App.php diff --git a/library/think/build.php b/library/think/Build.php similarity index 100% rename from library/think/build.php rename to library/think/Build.php diff --git a/library/think/cache.php b/library/think/Cache.php similarity index 100% rename from library/think/cache.php rename to library/think/Cache.php diff --git a/library/think/config.php b/library/think/Config.php similarity index 100% rename from library/think/config.php rename to library/think/Config.php diff --git a/library/think/controller.php b/library/think/Controller.php similarity index 100% rename from library/think/controller.php rename to library/think/Controller.php diff --git a/library/think/cookie.php b/library/think/Cookie.php similarity index 100% rename from library/think/cookie.php rename to library/think/Cookie.php diff --git a/library/think/db.php b/library/think/Db.php similarity index 100% rename from library/think/db.php rename to library/think/Db.php diff --git a/library/think/debug.php b/library/think/Debug.php similarity index 100% rename from library/think/debug.php rename to library/think/Debug.php diff --git a/library/think/error.php b/library/think/Error.php similarity index 100% rename from library/think/error.php rename to library/think/Error.php diff --git a/library/think/exception.php b/library/think/Exception.php similarity index 100% rename from library/think/exception.php rename to library/think/Exception.php diff --git a/library/think/hook.php b/library/think/Hook.php similarity index 100% rename from library/think/hook.php rename to library/think/Hook.php diff --git a/library/think/input.php b/library/think/Input.php similarity index 100% rename from library/think/input.php rename to library/think/Input.php diff --git a/library/think/lang.php b/library/think/Lang.php similarity index 100% rename from library/think/lang.php rename to library/think/Lang.php diff --git a/library/think/loader.php b/library/think/Loader.php similarity index 98% rename from library/think/loader.php rename to library/think/Loader.php index a8baa404..a022a0dd 100644 --- a/library/think/loader.php +++ b/library/think/Loader.php @@ -53,7 +53,7 @@ class Loader } else { return; } - $filename = $path . str_replace('\\', DS, str_replace('\\_', '\\', strtolower(trim(preg_replace("/[A-Z]/", "_\\0", $class), "_")))) . EXT; + $filename = $path . str_replace('\\', DS, $class) . EXT; if (is_file($filename)) { include $filename; } diff --git a/library/think/log.php b/library/think/Log.php similarity index 100% rename from library/think/log.php rename to library/think/Log.php diff --git a/library/think/model.php b/library/think/Model.php similarity index 100% rename from library/think/model.php rename to library/think/Model.php diff --git a/library/think/response.php b/library/think/Response.php similarity index 100% rename from library/think/response.php rename to library/think/Response.php diff --git a/library/think/route.php b/library/think/Route.php similarity index 100% rename from library/think/route.php rename to library/think/Route.php diff --git a/library/think/session.php b/library/think/Session.php similarity index 100% rename from library/think/session.php rename to library/think/Session.php diff --git a/library/think/template.php b/library/think/Template.php similarity index 96% rename from library/think/template.php rename to library/think/Template.php index f4334ace..9c5fdcc1 100644 --- a/library/think/template.php +++ b/library/think/Template.php @@ -544,7 +544,7 @@ class Template $className = $tagLib; $tagLib = substr($tagLib, strrpos($tagLib, '\\') + 1); } else { - $className = '\\think\\template\\taglib\\' . strtolower($tagLib); + $className = '\\think\\template\\taglib\\' . ucwords($tagLib); } $tLib = new $className($this); $tLib->parseTag($content, $hide ? '' : $tagLib); @@ -590,17 +590,17 @@ class Template $str = stripslashes($match[1]); $flag = substr($str, 0, 1); switch ($flag) { - case '$': // 解析模板变量 格式 {$varName} + case '$': // 解析模板变量 格式 {$varName} $this->parseVar($str); $identify = isset($this->config['tpl_var_identify']) ? strtolower($this->config['tpl_var_identify']) : ''; switch ($identify) { - case 'array': + case 'array': $begin = 0; break; - case 'obj': + case 'obj': $begin = 1; break; - default: + default: // 如果是自动识别.语法,则要查找:之后的?号 $begin = strpos($str, ':'); } @@ -616,8 +616,8 @@ class Template // 设置了判断条件 // XXX: 加入这句原本是为解决变量末声明的问题,但$name中是多个条件时会解析错误,故注释掉 /*if (strpos($name, '[')) { - $name = 'isset(' . $name . ') && ' . $name; - }*/ + $name = 'isset(' . $name . ') && ' . $name; + }*/ $name .= $array[1] . trim($array[2]); if ('=' == $first) { // {$varname?='xxx'} $varname为真时才输出xxx @@ -628,31 +628,31 @@ class Template } elseif ($begin || ')' == substr($name, -1, 1)) { // $name为对象或是自动识别,或者含有函数 switch ($first) { - case '?': + case '?': $str = ''; break; - case '=': + case '=': $str = ''; break; - default: + default: $str = ''; } } else { // $name为数组 switch ($first) { - case '?': + case '?': // {$varname??'xxx'} $varname有定义则输出$varname,否则输出xxx $str = ''; break; - case '=': + case '=': // {$varname?='xxx'} $varname为真时才输出xxx $str = ''; break; - case ':': + case ':': // {$varname?:'xxx'} $varname为真时输出$varname,否则输出xxx $str = ''; break; - default: + default: if (strpos($str, ':')) { // {$varname ? 'a' : 'b'} $varname为真时输出a,否则输出b $str = ''; @@ -666,20 +666,20 @@ class Template $str = ''; } break; - case ':': // 输出某个函数的结果 + case ':': // 输出某个函数的结果 $str = substr($str, 1); $this->parseVar($str); $str = ''; break; - case '~': // 执行某个函数 + case '~': // 执行某个函数 $str = substr($str, 1); $str = ''; break; case '-': - case '+': // 输出计算 + case '+': // 输出计算 $str = ''; break; - case '/': // 注释标签 + case '/': // 注释标签 $flag2 = substr($str, 1, 1); if ('/' == $flag2 || ('*' == $flag2 && substr(rtrim($str), -2) == '*/')) { $str = ''; @@ -724,13 +724,13 @@ class Template } else { $identify = isset($this->config['tpl_var_identify']) ? strtolower($this->config['tpl_var_identify']) : ''; switch ($identify) { - case 'array': // 识别为数组 + case 'array': // 识别为数组 $parseStr = $first . '[\'' . implode('\'][\'', $vars) . '\']'; break; - case 'obj': // 识别为对象 + case 'obj': // 识别为对象 $parseStr = $first . '->' . implode('->', $vars); break; - default: // 自动判断数组或对象 只支持二维 + default: // 自动判断数组或对象 只支持二维 $parseStr = 'is_array(' . $first . ')?' . $first . '[\'' . implode('\'][\'', $vars) . '\']:' . $first . '->' . implode('->', $vars); } } @@ -775,10 +775,10 @@ class Template // 模板函数过滤 $fun = trim($args[0]); switch ($fun) { - case 'default': // 特殊模板函数 + case 'default': // 特殊模板函数 $name = '(isset(' . $name . ') && (' . $name . ' !== \'\'))?(' . $name . '):' . $args[1]; break; - default: // 通用模板函数 + default: // 通用模板函数 if (!in_array($fun, $template_deny_funs)) { if (isset($args[1])) { if (strstr($args[1], '###')) { diff --git a/library/think/url.php b/library/think/Url.php similarity index 100% rename from library/think/url.php rename to library/think/Url.php diff --git a/library/think/view.php b/library/think/View.php similarity index 100% rename from library/think/view.php rename to library/think/View.php diff --git a/library/think/cache/driver/apc.php b/library/think/cache/driver/Apc.php similarity index 100% rename from library/think/cache/driver/apc.php rename to library/think/cache/driver/Apc.php diff --git a/library/think/cache/driver/db.php b/library/think/cache/driver/Db.php similarity index 100% rename from library/think/cache/driver/db.php rename to library/think/cache/driver/Db.php diff --git a/library/think/cache/driver/file.php b/library/think/cache/driver/File.php similarity index 100% rename from library/think/cache/driver/file.php rename to library/think/cache/driver/File.php diff --git a/library/think/cache/driver/memcache.php b/library/think/cache/driver/Memcache.php similarity index 100% rename from library/think/cache/driver/memcache.php rename to library/think/cache/driver/Memcache.php diff --git a/library/think/cache/driver/redis.php b/library/think/cache/driver/Redis.php similarity index 100% rename from library/think/cache/driver/redis.php rename to library/think/cache/driver/Redis.php diff --git a/library/think/cache/driver/sae.php b/library/think/cache/driver/Sae.php similarity index 100% rename from library/think/cache/driver/sae.php rename to library/think/cache/driver/Sae.php diff --git a/library/think/cache/driver/secache.php b/library/think/cache/driver/Secache.php similarity index 100% rename from library/think/cache/driver/secache.php rename to library/think/cache/driver/Secache.php diff --git a/library/think/cache/driver/simple.php b/library/think/cache/driver/Simple.php similarity index 100% rename from library/think/cache/driver/simple.php rename to library/think/cache/driver/Simple.php diff --git a/library/think/cache/driver/sqlite.php b/library/think/cache/driver/Sqlite.php similarity index 100% rename from library/think/cache/driver/sqlite.php rename to library/think/cache/driver/Sqlite.php diff --git a/library/think/cache/driver/wincache.php b/library/think/cache/driver/Wincache.php similarity index 100% rename from library/think/cache/driver/wincache.php rename to library/think/cache/driver/Wincache.php diff --git a/library/think/cache/driver/xcache.php b/library/think/cache/driver/Xcache.php similarity index 100% rename from library/think/cache/driver/xcache.php rename to library/think/cache/driver/Xcache.php diff --git a/library/think/config/driver/ini.php b/library/think/config/driver/Ini.php similarity index 100% rename from library/think/config/driver/ini.php rename to library/think/config/driver/Ini.php diff --git a/library/think/config/driver/xml.php b/library/think/config/driver/Xml.php similarity index 100% rename from library/think/config/driver/xml.php rename to library/think/config/driver/Xml.php diff --git a/library/think/controller/hprose.php b/library/think/controller/Hprose.php similarity index 100% rename from library/think/controller/hprose.php rename to library/think/controller/Hprose.php diff --git a/library/think/controller/jsonrpc.php b/library/think/controller/Jsonrpc.php similarity index 100% rename from library/think/controller/jsonrpc.php rename to library/think/controller/Jsonrpc.php diff --git a/library/think/controller/rest.php b/library/think/controller/Rest.php similarity index 100% rename from library/think/controller/rest.php rename to library/think/controller/Rest.php diff --git a/library/think/controller/rpc.php b/library/think/controller/Rpc.php similarity index 100% rename from library/think/controller/rpc.php rename to library/think/controller/Rpc.php diff --git a/library/think/controller/yar.php b/library/think/controller/Yar.php similarity index 100% rename from library/think/controller/yar.php rename to library/think/controller/Yar.php diff --git a/library/think/db/driver.php b/library/think/db/Driver.php similarity index 100% rename from library/think/db/driver.php rename to library/think/db/Driver.php diff --git a/library/think/db/lite.php b/library/think/db/Lite.php similarity index 100% rename from library/think/db/lite.php rename to library/think/db/Lite.php diff --git a/library/think/db/driver/mongo.php b/library/think/db/driver/Mongo.php similarity index 100% rename from library/think/db/driver/mongo.php rename to library/think/db/driver/Mongo.php diff --git a/library/think/db/driver/mysql.php b/library/think/db/driver/Mysql.php similarity index 100% rename from library/think/db/driver/mysql.php rename to library/think/db/driver/Mysql.php diff --git a/library/think/db/driver/oracle.php b/library/think/db/driver/Oracle.php similarity index 100% rename from library/think/db/driver/oracle.php rename to library/think/db/driver/Oracle.php diff --git a/library/think/db/driver/pgsql.php b/library/think/db/driver/Pgsql.php similarity index 100% rename from library/think/db/driver/pgsql.php rename to library/think/db/driver/Pgsql.php diff --git a/library/think/db/driver/sqlite.php b/library/think/db/driver/Sqlite.php similarity index 100% rename from library/think/db/driver/sqlite.php rename to library/think/db/driver/Sqlite.php diff --git a/library/think/db/driver/sqlsrv.php b/library/think/db/driver/Sqlsrv.php similarity index 100% rename from library/think/db/driver/sqlsrv.php rename to library/think/db/driver/Sqlsrv.php diff --git a/library/think/log/alarm/email.php b/library/think/log/alarm/Email.php similarity index 100% rename from library/think/log/alarm/email.php rename to library/think/log/alarm/Email.php diff --git a/library/think/log/driver/file.php b/library/think/log/driver/File.php similarity index 100% rename from library/think/log/driver/file.php rename to library/think/log/driver/File.php diff --git a/library/think/log/driver/sae.php b/library/think/log/driver/Sae.php similarity index 100% rename from library/think/log/driver/sae.php rename to library/think/log/driver/Sae.php diff --git a/library/think/log/driver/socket.php b/library/think/log/driver/Socket.php similarity index 100% rename from library/think/log/driver/socket.php rename to library/think/log/driver/Socket.php diff --git a/library/think/log/driver/trace.php b/library/think/log/driver/Trace.php similarity index 100% rename from library/think/log/driver/trace.php rename to library/think/log/driver/Trace.php diff --git a/library/think/model/adv.php b/library/think/model/Adv.php similarity index 100% rename from library/think/model/adv.php rename to library/think/model/Adv.php diff --git a/library/think/model/mongo.php b/library/think/model/Mongo.php similarity index 100% rename from library/think/model/mongo.php rename to library/think/model/Mongo.php diff --git a/library/think/model/relation.php b/library/think/model/Relation.php similarity index 100% rename from library/think/model/relation.php rename to library/think/model/Relation.php diff --git a/library/think/model/view.php b/library/think/model/View.php similarity index 100% rename from library/think/model/view.php rename to library/think/model/View.php diff --git a/library/think/session/driver.php b/library/think/session/Driver.php similarity index 100% rename from library/think/session/driver.php rename to library/think/session/Driver.php diff --git a/library/think/template/taglib.php b/library/think/template/TagLib.php similarity index 100% rename from library/think/template/taglib.php rename to library/think/template/TagLib.php diff --git a/library/think/template/driver/file.php b/library/think/template/driver/File.php similarity index 100% rename from library/think/template/driver/file.php rename to library/think/template/driver/File.php diff --git a/library/think/template/driver/sae.php b/library/think/template/driver/Sae.php similarity index 100% rename from library/think/template/driver/sae.php rename to library/think/template/driver/Sae.php diff --git a/library/think/template/taglib/cx.php b/library/think/template/taglib/Cx.php similarity index 100% rename from library/think/template/taglib/cx.php rename to library/think/template/taglib/Cx.php diff --git a/library/think/view/driver/think.php b/library/think/view/driver/Think.php similarity index 100% rename from library/think/view/driver/think.php rename to library/think/view/driver/Think.php diff --git a/library/traits/controller/jump.php b/library/traits/controller/Jump.php similarity index 100% rename from library/traits/controller/jump.php rename to library/traits/controller/Jump.php diff --git a/library/traits/controller/view.php b/library/traits/controller/View.php similarity index 100% rename from library/traits/controller/view.php rename to library/traits/controller/View.php diff --git a/library/traits/model/adv.php b/library/traits/model/Adv.php similarity index 100% rename from library/traits/model/adv.php rename to library/traits/model/Adv.php diff --git a/library/traits/model/auto.php b/library/traits/model/Auto.php similarity index 100% rename from library/traits/model/auto.php rename to library/traits/model/Auto.php diff --git a/library/traits/model/query.php b/library/traits/model/Query.php similarity index 100% rename from library/traits/model/query.php rename to library/traits/model/Query.php diff --git a/library/traits/model/relation.php b/library/traits/model/Relation.php similarity index 100% rename from library/traits/model/relation.php rename to library/traits/model/Relation.php diff --git a/library/traits/model/view.php b/library/traits/model/View.php similarity index 100% rename from library/traits/model/view.php rename to library/traits/model/View.php diff --git a/library/traits/think/instance.php b/library/traits/think/Instance.php similarity index 100% rename from library/traits/think/instance.php rename to library/traits/think/Instance.php