diff --git a/library/org/auto.php b/library/org/auto.php index 50de171a..ff80c001 100644 --- a/library/org/auto.php +++ b/library/org/auto.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think; +namespace think; class Auto { diff --git a/library/org/controller/Amf.php b/library/org/controller/Amf.php deleted file mode 100644 index b4b9a6e8..00000000 --- a/library/org/controller/Amf.php +++ /dev/null @@ -1,29 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace Think\Controller; -abstract class Amf { - - /** - * PHPRpc控制器架构函数 - * @access public - */ - public function __construct() { - //导入类库 - Think\Loader::import('Vendor.Zend.Amf.Server'); - //实例化AMF - $server = new \Zend_Amf_Server(); - $server -> setClass($this); - echo $server -> handle(); - return ; - } - -} diff --git a/library/org/controller/Phprpc.php b/library/org/controller/Phprpc.php deleted file mode 100644 index f4274e06..00000000 --- a/library/org/controller/Phprpc.php +++ /dev/null @@ -1,34 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace Think\Controller; - -abstract class Phprpc { - /** - * PHPRpc控制器架构函数 - * @access public - */ - public function __construct() { - //导入类库 - Think\Loader::import('Vendor.phpRPC.phprpc_server'); - //实例化phprpc - $server = new \PHPRPC_Server(); - $server->add($this); - if(APP_DEBUG) { - $server->setDebugMode(true); - } - $server->setEnableGZIP(true); - $server->start(); - //C('PHPRPC_COMMENT',$server->comment()); - echo $server->comment(); - } - -} diff --git a/library/org/controller/Rest.php b/library/org/controller/Rest.php deleted file mode 100644 index 00d07d5c..00000000 --- a/library/org/controller/Rest.php +++ /dev/null @@ -1,215 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace Think\Controller; - -abstract class Rest { - - protected $_method = ''; // 当前请求类型 - protected $_type = ''; // 当前资源类型 - // 输出类型 - protected $restMethodList = 'get|post|put|delete'; - protected $restDefaultMethod = 'get'; - protected $restTypeList = 'html|xml|json|rss'; - protected $restDefaultType = 'html'; - protected $restOutputType = [ // REST允许输出的资源类型列表 - 'xml' => 'application/xml', - 'json' => 'application/json', - 'html' => 'text/html', - ]; - - /** - * 架构函数 取得模板对象实例 - * @access public - */ - public function __construct() { - // 资源类型检测 - if(''==__EXT__) { // 自动检测资源类型 - $this->_type = $this->getAcceptType(); - }elseif(!preg_match('/\('.$this->restTypeList.')$/i',__EXT__)) { - // 资源类型非法 则用默认资源类型访问 - $this->_type = $this->restDefaultType; - }else{ - $this->_type = __EXT__; - } - // 请求方式检测 - $method = strtolower($_SERVER['REQUEST_METHOD']); - if(false === stripos($this->restMethodList,$method)) { - // 请求方式非法 则用默认请求方法 - $method = $this->restDefaultMethod; - } - $this->_method = $method; - } - - /** - * REST 调用 - * @access public - * @param string $method 方法名 - * @param array $args 参数 - * @return mixed - */ - public function _empty($method,$args) { - if(method_exists($this,$method.'_'.$this->_method.'_'.$this->_type)) { // RESTFul方法支持 - $fun = $method.'_'.$this->_method.'_'.$this->_type; - }elseif($this->_method == $this->restDefaultMethod && method_exists($this,$method.'_'.$this->_type) ){ - $fun = $method.'_'.$this->_type; - }elseif($this->_type == $this->restDefaultType && method_exists($this,$method.'_'.$this->_method) ){ - $fun = $method.'_'.$this->_method; - } - if(isset($fun)) { - $this->$fun(); - }else{ - // 抛出异常 - E(L('_ERROR_ACTION_:').ACTION_NAME); - } - } - - /** - * 设置页面输出的CONTENT_TYPE和编码 - * @access public - * @param string $type content_type 类型对应的扩展名 - * @param string $charset 页面输出编码 - * @return void - */ - public function setContentType($type, $charset='utf-8'){ - if(headers_sent()) return; - $type = strtolower($type); - if(isset($this->restOutputType[$type])) //过滤content_type - header('Content-Type: '.$this->restOutputType[$type].'; charset='.$charset); - } - - /** - * 输出返回数据 - * @access protected - * @param mixed $data 要返回的数据 - * @param String $type 返回类型 JSON XML - * @param integer $code HTTP状态 - * @return void - */ - protected function response($data,$type='',$code=200) { - $this->sendHttpStatus($code); - exit($this->encodeData($data,strtolower($type))); - } - - /** - * 编码数据 - * @access protected - * @param mixed $data 要返回的数据 - * @param String $type 返回类型 JSON XML - * @return void - */ - protected function encodeData($data,$type='') { - if(empty($data)) return ''; - if('json' == $type) { - // 返回JSON数据格式到客户端 包含状态信息 - $data = json_encode($data); - }elseif('xml' == $type){ - // 返回xml格式数据 - $data = xml_encode($data); - }elseif('php'==$type){ - $data = serialize($data); - }// 默认直接输出 - $this->setContentType($type); - header('Content-Length: ' . strlen($data)); - return $data; - } - - // 发送Http状态信息 - protected function sendHttpStatus($status) { - static $_status = [ - // Informational 1xx - 100 => 'Continue', - 101 => 'Switching Protocols', - // Success 2xx - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - // Redirection 3xx - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Moved Temporarily ', // 1.1 - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - // 306 is deprecated but reserved - 307 => 'Temporary Redirect', - // Client Error 4xx - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - // Server Error 5xx - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 509 => 'Bandwidth Limit Exceeded' - ]; - if(isset($_status[$code])) { - header('HTTP/1.1 '.$code.' '.$_status[$code]); - // 确保FastCGI模式下正常 - header('Status:'.$code.' '.$_status[$code]); - } - } - - /** - * 获取当前请求的Accept头信息 - * @return string - */ - protected function getAcceptType(){ - $type = [ - 'html' => 'text/html,application/xhtml+xml,*/*', - 'xml' => 'application/xml,text/xml,application/x-xml', - 'json' => 'application/json,text/x-json,application/jsonrequest,text/json', - 'js' => 'text/javascript,application/javascript,application/x-javascript', - 'css' => 'text/css', - 'rss' => 'application/rss+xml', - 'yaml' => 'application/x-yaml,text/yaml', - 'atom' => 'application/atom+xml', - 'pdf' => 'application/pdf', - 'text' => 'text/plain', - 'png' => 'image/png', - 'jpg' => 'image/jpg,image/jpeg,image/pjpeg', - 'gif' => 'image/gif', - 'csv' => 'text/csv' - ]; - - foreach($type as $key=>$val){ - $array = explode(',',$val); - foreach($array as $k=>$v){ - if(stristr($_SERVER['HTTP_ACCEPT'], $v)) { - return $key; - } - } - } - return false; - } -} diff --git a/library/org/crypt.php b/library/org/crypt.php index 393b93e0..4c237cc6 100644 --- a/library/org/crypt.php +++ b/library/org/crypt.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think; +namespace think; class Crypt { /** diff --git a/library/org/filter.php b/library/org/filter.php index 6fcda662..6b0ec25f 100644 --- a/library/org/filter.php +++ b/library/org/filter.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think; +namespace think; class Filter { //html标签设置 diff --git a/library/org/image.php b/library/org/image.php index 3db9b3cc..f0c3d353 100644 --- a/library/org/image.php +++ b/library/org/image.php @@ -9,7 +9,7 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think; +namespace think; /* 缩略图相关常量定义 */ define('THINKIMAGE_THUMB_SCALING', 1); //常量,标识缩略图等比例缩放类型 diff --git a/library/org/image/Driver/Gd.php b/library/org/image/Driver/Gd.php index 34facecd..fc6c6187 100644 --- a/library/org/image/Driver/Gd.php +++ b/library/org/image/Driver/Gd.php @@ -9,7 +9,7 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Image\Driver; +namespace think\image\driver; class Gd{ /** diff --git a/library/org/image/Driver/Gif.php b/library/org/image/Driver/Gif.php index f3f6b6bc..503c2efe 100644 --- a/library/org/image/Driver/Gif.php +++ b/library/org/image/Driver/Gif.php @@ -9,7 +9,7 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Image\Driver; +namespace think\image\driver; class Gif{ /** diff --git a/library/org/image/Driver/Imagick.php b/library/org/image/Driver/Imagick.php index 85d9b5ef..09c03f1f 100644 --- a/library/org/image/Driver/Imagick.php +++ b/library/org/image/Driver/Imagick.php @@ -9,7 +9,7 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Image\Driver; +namespace think\image\driver; class Imagick{ /** diff --git a/library/org/oauth.php b/library/org/oauth.php index 1a42de6c..c7b3de70 100644 --- a/library/org/oauth.php +++ b/library/org/oauth.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think; +namespace think; // oauth登录接口 // diff --git a/library/org/oauth/Driver.php b/library/org/oauth/Driver.php index cfb8938f..a6414d0b 100644 --- a/library/org/oauth/Driver.php +++ b/library/org/oauth/Driver.php @@ -9,7 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Oauth; +namespace think\oauth; + abstract class Driver { /** diff --git a/library/org/oauth/Driver/Baidu.php b/library/org/oauth/Driver/Baidu.php index 09328f0d..388e89bc 100644 --- a/library/org/oauth/Driver/Baidu.php +++ b/library/org/oauth/Driver/Baidu.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Baidu extends Driver{ /** diff --git a/library/org/oauth/Driver/Diandian.php b/library/org/oauth/Driver/Diandian.php index d070da0f..6b648265 100644 --- a/library/org/oauth/Driver/Diandian.php +++ b/library/org/oauth/Driver/Diandian.php @@ -9,8 +9,8 @@ // | Author: 杨维杰 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Diandian extends Driver{ /** diff --git a/library/org/oauth/Driver/Douban.php b/library/org/oauth/Driver/Douban.php index d7962507..faa40050 100644 --- a/library/org/oauth/Driver/Douban.php +++ b/library/org/oauth/Driver/Douban.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Douban extends Driver{ /** diff --git a/library/org/oauth/Driver/Github.php b/library/org/oauth/Driver/Github.php index bca8d3b8..6f9766ee 100644 --- a/library/org/oauth/Driver/Github.php +++ b/library/org/oauth/Driver/Github.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Github extends Driver{ /** diff --git a/library/org/oauth/Driver/Google.php b/library/org/oauth/Driver/Google.php index 5a9ceac0..c789d9fa 100644 --- a/library/org/oauth/Driver/Google.php +++ b/library/org/oauth/Driver/Google.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Google extends Driver{ /** diff --git a/library/org/oauth/Driver/Kaixin.php b/library/org/oauth/Driver/Kaixin.php index 026b5b04..90466126 100644 --- a/library/org/oauth/Driver/Kaixin.php +++ b/library/org/oauth/Driver/Kaixin.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Kaixin extends Driver{ /** diff --git a/library/org/oauth/Driver/Msn.php b/library/org/oauth/Driver/Msn.php index 30ec22e7..3473e22f 100644 --- a/library/org/oauth/Driver/Msn.php +++ b/library/org/oauth/Driver/Msn.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Msn extends Driver{ /** diff --git a/library/org/oauth/Driver/Qq.php b/library/org/oauth/Driver/Qq.php index 339564e1..a601a9c9 100644 --- a/library/org/oauth/Driver/Qq.php +++ b/library/org/oauth/Driver/Qq.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Qq extends Driver{ /** diff --git a/library/org/oauth/Driver/Renren.php b/library/org/oauth/Driver/Renren.php index bdb31520..942a15e5 100644 --- a/library/org/oauth/Driver/Renren.php +++ b/library/org/oauth/Driver/Renren.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Renren extends Driver{ /** diff --git a/library/org/oauth/Driver/Sina.php b/library/org/oauth/Driver/Sina.php index f58c1fca..369ab185 100644 --- a/library/org/oauth/Driver/Sina.php +++ b/library/org/oauth/Driver/Sina.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Sina extends Driver{ /** diff --git a/library/org/oauth/Driver/Sohu.php b/library/org/oauth/Driver/Sohu.php index 35827484..c9a3845a 100644 --- a/library/org/oauth/Driver/Sohu.php +++ b/library/org/oauth/Driver/Sohu.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Sohu extends Driver{ /** diff --git a/library/org/oauth/Driver/T163.php b/library/org/oauth/Driver/T163.php index bc5cc86c..7b34fab2 100644 --- a/library/org/oauth/Driver/T163.php +++ b/library/org/oauth/Driver/T163.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class T163 extends Driver{ /** diff --git a/library/org/oauth/Driver/Taobao.php b/library/org/oauth/Driver/Taobao.php index b765f771..52478219 100644 --- a/library/org/oauth/Driver/Taobao.php +++ b/library/org/oauth/Driver/Taobao.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Taobao extends Driver{ /** diff --git a/library/org/oauth/Driver/Tencent.php b/library/org/oauth/Driver/Tencent.php index 030dd5dc..abb84395 100644 --- a/library/org/oauth/Driver/Tencent.php +++ b/library/org/oauth/Driver/Tencent.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class Tencent extends Driver{ /** diff --git a/library/org/oauth/Driver/X360.php b/library/org/oauth/Driver/X360.php index 28ac1ccb..e8990bf7 100644 --- a/library/org/oauth/Driver/X360.php +++ b/library/org/oauth/Driver/X360.php @@ -9,8 +9,8 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Oauth\Driver; -use Think\Oauth\Driver; +namespace think\oauth\driver; +use think\oauth\driver; class X360 extends Driver{ /** diff --git a/library/org/transform/Driver/Json.php b/library/org/transform/Driver/Json.php index 6a4f0b84..15fc17d9 100644 --- a/library/org/transform/Driver/Json.php +++ b/library/org/transform/Driver/Json.php @@ -9,7 +9,7 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Transform\Driver; +namespace think\transform\driver; class Json{ public function encode($data){ diff --git a/library/org/transform/Driver/Xml.php b/library/org/transform/Driver/Xml.php index 0e0d20f7..adc11d58 100644 --- a/library/org/transform/Driver/Xml.php +++ b/library/org/transform/Driver/Xml.php @@ -9,7 +9,7 @@ // | Author: 麦当苗儿 // +---------------------------------------------------------------------- -namespace Think\Transform\Driver; +namespace think\transform\driver; class Xml{ /** diff --git a/library/org/upload.php b/library/org/upload.php index 31941de7..338898f8 100644 --- a/library/org/upload.php +++ b/library/org/upload.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think; +namespace think; class Upload { protected $config = [ diff --git a/library/org/validate.php b/library/org/validate.php index 8c92c3bf..d6837799 100644 --- a/library/org/validate.php +++ b/library/org/validate.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think; +namespace think; class Validate { diff --git a/library/think/behavior/ContentReplace.php b/library/think/behavior/ContentReplace.php index 76e3300b..737a1af2 100644 --- a/library/think/behavior/ContentReplace.php +++ b/library/think/behavior/ContentReplace.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Behavior; -use Think\Config; +namespace think\behavior; +use think\config; /** * 系统行为扩展:模板内容输出替换 diff --git a/library/think/behavior/LocationTemplate.php b/library/think/behavior/LocationTemplate.php index 327553d5..e14b20f6 100644 --- a/library/think/behavior/LocationTemplate.php +++ b/library/think/behavior/LocationTemplate.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Behavior; +namespace think\behavior; /** * 系统行为扩展:定位模板文件 diff --git a/library/think/behavior/ReadHtmlCache.php b/library/think/behavior/ReadHtmlCache.php index 9027d447..3ba9638f 100644 --- a/library/think/behavior/ReadHtmlCache.php +++ b/library/think/behavior/ReadHtmlCache.php @@ -9,6 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- +namespace think\behavior; + /** * 系统行为扩展:静态缓存读取 * @category Think @@ -16,7 +18,7 @@ * @subpackage Behavior * @author liu21st */ -class ReadHtmlCacheBehavior { +class ReadHtmlCache { protected $options = [ 'HTML_CACHE_ON' => false, 'HTML_CACHE_TIME' => 60, diff --git a/library/think/behavior/ShowPageTrace.php b/library/think/behavior/ShowPageTrace.php index 0fff7677..7d56869f 100644 --- a/library/think/behavior/ShowPageTrace.php +++ b/library/think/behavior/ShowPageTrace.php @@ -9,10 +9,10 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Behavior; -use Think\Config; -use Think\Log; -use Think\Debug; +namespace think\behavior; +use think\Config; +use think\Log; +use think\Debug; /** * 系统行为扩展:页面Trace显示输出 diff --git a/library/think/behavior/TokenBuild.php b/library/think/behavior/TokenBuild.php index 082e25b3..5d6fa2cc 100644 --- a/library/think/behavior/TokenBuild.php +++ b/library/think/behavior/TokenBuild.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -defined('THINK_PATH') or exit(); +namespace think\behavior; /** * 系统行为扩展:表单令牌生成 * @category Think @@ -17,7 +17,7 @@ defined('THINK_PATH') or exit(); * @subpackage Behavior * @author liu21st */ -class TokenBuildBehavior extends Behavior { +class TokenBuild extends Behavior { // 行为参数定义 protected $options = [ 'TOKEN_ON' => false, // 开启令牌验证 diff --git a/library/think/cache/driver/apc.php b/library/think/cache/driver/apc.php index aad5bd11..42545c0d 100644 --- a/library/think/cache/driver/apc.php +++ b/library/think/cache/driver/apc.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Apc缓存驱动 diff --git a/library/think/cache/driver/db.php b/library/think/cache/driver/db.php index c2a02898..00551a35 100644 --- a/library/think/cache/driver/db.php +++ b/library/think/cache/driver/db.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * 数据库方式缓存驱动 diff --git a/library/think/cache/driver/eaccelerator.php b/library/think/cache/driver/eaccelerator.php index a0ec2795..625fee74 100644 --- a/library/think/cache/driver/eaccelerator.php +++ b/library/think/cache/driver/eaccelerator.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Eaccelerator缓存驱动 diff --git a/library/think/cache/driver/file.php b/library/think/cache/driver/file.php index 285fb9b1..ff2dce33 100644 --- a/library/think/cache/driver/file.php +++ b/library/think/cache/driver/file.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * 文件类型缓存类 diff --git a/library/think/cache/driver/memcache.php b/library/think/cache/driver/memcache.php index bd3b0a3f..0cdb534c 100644 --- a/library/think/cache/driver/memcache.php +++ b/library/think/cache/driver/memcache.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Memcache缓存驱动 diff --git a/library/think/cache/driver/redis.php b/library/think/cache/driver/redis.php index e66affdf..e7895a9b 100644 --- a/library/think/cache/driver/redis.php +++ b/library/think/cache/driver/redis.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Redis缓存驱动 diff --git a/library/think/cache/driver/secache.php b/library/think/cache/driver/secache.php index 88d4bec0..7b1ed37f 100644 --- a/library/think/cache/driver/secache.php +++ b/library/think/cache/driver/secache.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Secache缓存驱动 diff --git a/library/think/cache/driver/simple.php b/library/think/cache/driver/simple.php index e6231d92..fdf10ae4 100644 --- a/library/think/cache/driver/simple.php +++ b/library/think/cache/driver/simple.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * 文件类型缓存类 diff --git a/library/think/cache/driver/sqlite.php b/library/think/cache/driver/sqlite.php index d98da914..22261e8c 100644 --- a/library/think/cache/driver/sqlite.php +++ b/library/think/cache/driver/sqlite.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Sqlite缓存驱动 diff --git a/library/think/cache/driver/wincache.php b/library/think/cache/driver/wincache.php index 9b963f75..6dfeaa08 100644 --- a/library/think/cache/driver/wincache.php +++ b/library/think/cache/driver/wincache.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Wincache缓存驱动 diff --git a/library/think/cache/driver/xcache.php b/library/think/cache/driver/xcache.php index ce4b37a8..9a9b08fa 100644 --- a/library/think/cache/driver/xcache.php +++ b/library/think/cache/driver/xcache.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Cache\Driver; +namespace think\cache\driver; /** * Xcache缓存驱动 diff --git a/library/think/config/driver/ini.php b/library/think/config/driver/ini.php index 398e631a..bfa33da0 100644 --- a/library/think/config/driver/ini.php +++ b/library/think/config/driver/ini.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Config\Driver; +namespace think\config\driver; class Ini { public function parse($config){ diff --git a/library/think/config/driver/xml.php b/library/think/config/driver/xml.php index e19e3e48..a77e5ae8 100644 --- a/library/think/config/driver/xml.php +++ b/library/think/config/driver/xml.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Config\Driver; +namespace think\config\driver; class Xml { public function parse($config){ diff --git a/library/think/db/driver.php b/library/think/db/driver.php index f0082973..01f80a26 100644 --- a/library/think/db/driver.php +++ b/library/think/db/driver.php @@ -9,10 +9,10 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db; -use Think\Config; -use Think\Debug; -use Think\Log; +namespace think\db; +use think\config; +use think\debug; +use think\log; use PDO; abstract class Driver { diff --git a/library/think/db/driver/mongo.php b/library/think/db/driver/mongo.php index e17cbf77..6fdb6f12 100644 --- a/library/think/db/driver/mongo.php +++ b/library/think/db/driver/mongo.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db\Driver; -use Think\Db\Driver; +namespace think\db\driver; +use think\db\driver; /** * Mongo数据库驱动 diff --git a/library/think/db/driver/mysql.php b/library/think/db/driver/mysql.php index b0d4008e..e7d68859 100644 --- a/library/think/db/driver/mysql.php +++ b/library/think/db/driver/mysql.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db\Driver; -use Think\Db\Driver; +namespace think\db\driver; +use think\db\driver; /** * mysql数据库驱动 diff --git a/library/think/db/driver/oracle.php b/library/think/db/driver/oracle.php index 2dfbe41b..d9dd2836 100644 --- a/library/think/db/driver/oracle.php +++ b/library/think/db/driver/oracle.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db\Driver; -use Think\Db\Driver; +namespace think\db\driver; +use think\db\driver; /** * Oracle数据库驱动 diff --git a/library/think/db/driver/pgsql.php b/library/think/db/driver/pgsql.php index 266c4ca1..f9bb7243 100644 --- a/library/think/db/driver/pgsql.php +++ b/library/think/db/driver/pgsql.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db\Driver; -use Think\Db\Driver; +namespace think\db\driver; +use think\db\driver; /** * Pgsql数据库驱动 diff --git a/library/think/db/driver/sqlite.php b/library/think/db/driver/sqlite.php index dac545d7..d670df4e 100644 --- a/library/think/db/driver/sqlite.php +++ b/library/think/db/driver/sqlite.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db\Driver; -use Think\Db\Driver; +namespace think\db\driver; +use think\db\driver; /** * Sqlite数据库驱动 diff --git a/library/think/db/driver/sqlsrv.php b/library/think/db/driver/sqlsrv.php index 85666c2a..141ebd01 100644 --- a/library/think/db/driver/sqlsrv.php +++ b/library/think/db/driver/sqlsrv.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db\Driver; -use Think\Db\Driver; +namespace think\db\driver; +use think\db\driver; use PDO; /** diff --git a/library/think/db/lite.php b/library/think/db/lite.php index 76e7bad5..6d50dd43 100644 --- a/library/think/db/lite.php +++ b/library/think/db/lite.php @@ -9,10 +9,10 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Db; -use Think\Config; -use Think\Debug; -use Think\Log; +namespace think\db; +use think\config; +use think\debug; +use think\log; use PDO; class Lite { diff --git a/library/think/log/driver/file.php b/library/think/log/driver/file.php index 1c2e81d3..9731289c 100644 --- a/library/think/log/driver/file.php +++ b/library/think/log/driver/file.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Log\Driver; +namespace think\log\driver; class File { diff --git a/library/think/model/ExtendModel.php b/library/think/model/ExtendModel.php index dc878991..335d3498 100644 --- a/library/think/model/ExtendModel.php +++ b/library/think/model/ExtendModel.php @@ -9,10 +9,13 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Model; -use Traits\Think\Model\Extend,Traits\Think\Model\Query; -T('Think/Model/Extend'); -T('Think/Model/Query'); -class ExtendModel extends \Think\Model { - use Extend,Query; +namespace think\model; +use traits\think\model\extend, + traits\think\model\query; + +T('think/model/extend'); +T('think/model/query'); + +class ExtendModel extends \think\model { + use extend, query; } \ No newline at end of file diff --git a/library/think/model/MongoModel.php b/library/think/model/MongoModel.php index a3858e87..fedcf843 100644 --- a/library/think/model/MongoModel.php +++ b/library/think/model/MongoModel.php @@ -8,7 +8,8 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Model; +namespace think\model; + /** * MongoModel模型类 * 实现了ODM和ActiveRecords模式 diff --git a/library/think/model/RelationModel.php b/library/think/model/RelationModel.php index 4989bee3..3e142d84 100644 --- a/library/think/model/RelationModel.php +++ b/library/think/model/RelationModel.php @@ -9,8 +9,9 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Model; -T('Think/Model/Relation'); -class RelationModel extends \Think\Model { - use \Traits\Think\Model\Relation; +namespace think\model; + +T('think/model/relation'); +class RelationModel extends \think\model { + use \traits\think\model\relation; } \ No newline at end of file diff --git a/library/think/model/ViewModel.php b/library/think/model/ViewModel.php index 44faee86..39bce566 100644 --- a/library/think/model/ViewModel.php +++ b/library/think/model/ViewModel.php @@ -9,8 +9,9 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Model; -T('Think/Model/View'); -class ViewModel extends \Think\Model { - use \Traits\Think\Model\View; +namespace think\model; + +T('think/model/view'); +class ViewModel extends \think\model { + use \traits\think\model\view; } \ No newline at end of file diff --git a/library/think/parser/driver/Markdown.php b/library/think/parser/driver/Markdown.php index 334f7a60..d19cb38d 100644 --- a/library/think/parser/driver/Markdown.php +++ b/library/think/parser/driver/Markdown.php @@ -13,7 +13,7 @@ # 应用到ThinkPHP中,因而修改为ThinkPHP规范的命名空间 # namespace Michelf; -namespace Think\Parser\Driver; +namespace think\parser\driver; # # The following two constants are deprecated: avoid using them, they'll diff --git a/library/think/parser/driver/Ubb.php b/library/think/parser/driver/Ubb.php index 525549ce..c6a39fcf 100644 --- a/library/think/parser/driver/Ubb.php +++ b/library/think/parser/driver/Ubb.php @@ -11,7 +11,7 @@ // | Ubb.php 2013-04-03 // +---------------------------------------------------------------------- -namespace Think\Parser\Driver; +namespace think\parser\driver; class Ubb{ /** diff --git a/library/think/seesion/driver.php b/library/think/seesion/driver.php index 06e0a38e..6cac339a 100644 --- a/library/think/seesion/driver.php +++ b/library/think/seesion/driver.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Session\Driver; +namespace think\session\driver; use SessionHandler; class Driver extends SessionHandler { diff --git a/library/think/storage/Driver/File.php b/library/think/storage/Driver/File.php index cc8a0333..33f9a87c 100644 --- a/library/think/storage/Driver/File.php +++ b/library/think/storage/Driver/File.php @@ -8,8 +8,9 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Storage\Driver; -use Think\Storage; +namespace think\storage\driver; +use think\storage; + // 本地文件写入存储类 class File extends Storage{ diff --git a/library/think/storage/Driver/Sae.php b/library/think/storage/Driver/Sae.php index 98970081..ad8ca423 100644 --- a/library/think/storage/Driver/Sae.php +++ b/library/think/storage/Driver/Sae.php @@ -8,8 +8,9 @@ // +---------------------------------------------------------------------- // | Author: luofei614 // +---------------------------------------------------------------------- -namespace Think\Storage\Driver; -use Think\Storage; +namespace think\storage\driver; +use think\storage; + // SAE环境文件写入存储类 class Sae extends Storage{ diff --git a/library/think/template/driver/file.php b/library/think/template/driver/file.php index 09c9de4f..7181db4d 100644 --- a/library/think/template/driver/file.php +++ b/library/think/template/driver/file.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Template\Driver; -use Think\Exception; +namespace think\template\driver; +use think\exception; class File { // 写入编译缓存 diff --git a/library/think/template/taglib.php b/library/think/template/taglib.php index d6bf9a6e..b01499d5 100644 --- a/library/think/template/taglib.php +++ b/library/think/template/taglib.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Template; +namespace think\template; /** * ThinkPHP标签库TagLib解析基类 diff --git a/library/think/template/taglib/cx.php b/library/think/template/taglib/cx.php index fe52c0b0..102e84e3 100644 --- a/library/think/template/taglib/cx.php +++ b/library/think/template/taglib/cx.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\Template\Taglib; -use Think\Template\Taglib; +namespace think\template\taglib; +use think\template\taglib; /** * CX标签库解析类 diff --git a/library/think/view/driver/think.php b/library/think/view/driver/think.php index bf73462d..30d82d7a 100644 --- a/library/think/view/driver/think.php +++ b/library/think/view/driver/think.php @@ -9,8 +9,8 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace Think\View\Driver; -use Think\Template; +namespace think\view\driver; +use think\template; class Think { private $template = null;