修正 命名空间大小写

修正 扩展控制器目录位置
This commit is contained in:
huangdijia
2015-01-23 13:39:51 +08:00
parent b32d00b7f8
commit a2716ad313
71 changed files with 127 additions and 394 deletions

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
class Auto {

View File

@@ -1,29 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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 ;
}
}

View File

@@ -1,34 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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();
}
}

View File

@@ -1,215 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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;
}
}

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
class Crypt {
/**

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
class Filter {
//html标签设置

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
/* 缩略图相关常量定义 */
define('THINKIMAGE_THUMB_SCALING', 1); //常量,标识缩略图等比例缩放类型

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Image\Driver;
namespace think\image\driver;
class Gd{
/**

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Image\Driver;
namespace think\image\driver;
class Gif{
/**

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Image\Driver;
namespace think\image\driver;
class Imagick{
/**

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
// oauth登录接口
// <code>

View File

@@ -9,7 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Oauth;
namespace think\oauth;
abstract class Driver {
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Baidu extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 杨维杰 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Diandian extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Douban extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Github extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Google extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Kaixin extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Msn extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Qq extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Renren extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Sina extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Sohu extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class T163 extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Taobao extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class Tencent extends Driver{
/**

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace think\oauth\driver;
use think\oauth\driver;
class X360 extends Driver{
/**

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Transform\Driver;
namespace think\transform\driver;
class Json{
public function encode($data){

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Transform\Driver;
namespace think\transform\driver;
class Xml{
/**

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
class Upload {
protected $config = [

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think;
namespace think;
class Validate {

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Behavior;
use Think\Config;
namespace think\behavior;
use think\config;
/**
* 系统行为扩展:模板内容输出替换

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Behavior;
namespace think\behavior;
/**
* 系统行为扩展:定位模板文件

View File

@@ -9,6 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think\behavior;
/**
* 系统行为扩展:静态缓存读取
* @category Think
@@ -16,7 +18,7 @@
* @subpackage Behavior
* @author liu21st <liu21st@gmail.com>
*/
class ReadHtmlCacheBehavior {
class ReadHtmlCache {
protected $options = [
'HTML_CACHE_ON' => false,
'HTML_CACHE_TIME' => 60,

View File

@@ -9,10 +9,10 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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显示输出

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
defined('THINK_PATH') or exit();
namespace think\behavior;
/**
* 系统行为扩展:表单令牌生成
* @category Think
@@ -17,7 +17,7 @@ defined('THINK_PATH') or exit();
* @subpackage Behavior
* @author liu21st <liu21st@gmail.com>
*/
class TokenBuildBehavior extends Behavior {
class TokenBuild extends Behavior {
// 行为参数定义
protected $options = [
'TOKEN_ON' => false, // 开启令牌验证

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Apc缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* 数据库方式缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Eaccelerator缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* 文件类型缓存类

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Memcache缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Redis缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Secache缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* 文件类型缓存类

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Sqlite缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Wincache缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Cache\Driver;
namespace think\cache\driver;
/**
* Xcache缓存驱动

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Config\Driver;
namespace think\config\driver;
class Ini {
public function parse($config){

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Config\Driver;
namespace think\config\driver;
class Xml {
public function parse($config){

View File

@@ -9,10 +9,10 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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 {

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Db\Driver;
use Think\Db\Driver;
namespace think\db\driver;
use think\db\driver;
/**
* Mongo数据库驱动

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Db\Driver;
use Think\Db\Driver;
namespace think\db\driver;
use think\db\driver;
/**
* mysql数据库驱动

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Db\Driver;
use Think\Db\Driver;
namespace think\db\driver;
use think\db\driver;
/**
* Oracle数据库驱动

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Db\Driver;
use Think\Db\Driver;
namespace think\db\driver;
use think\db\driver;
/**
* Pgsql数据库驱动

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Db\Driver;
use Think\Db\Driver;
namespace think\db\driver;
use think\db\driver;
/**
* Sqlite数据库驱动

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Db\Driver;
use Think\Db\Driver;
namespace think\db\driver;
use think\db\driver;
use PDO;
/**

View File

@@ -9,10 +9,10 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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 {

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Log\Driver;
namespace think\log\driver;
class File {

View File

@@ -9,10 +9,13 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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;
}

View File

@@ -8,7 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Model;
namespace think\model;
/**
* MongoModel模型类
* 实现了ODM和ActiveRecords模式

View File

@@ -9,8 +9,9 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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;
}

View File

@@ -9,8 +9,9 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
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;
}

View File

@@ -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

View File

@@ -11,7 +11,7 @@
// | Ubb.php 2013-04-03
// +----------------------------------------------------------------------
namespace Think\Parser\Driver;
namespace think\parser\driver;
class Ubb{
/**

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Session\Driver;
namespace think\session\driver;
use SessionHandler;
class Driver extends SessionHandler {

View File

@@ -8,8 +8,9 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Storage\Driver;
use Think\Storage;
namespace think\storage\driver;
use think\storage;
// 本地文件写入存储类
class File extends Storage{

View File

@@ -8,8 +8,9 @@
// +----------------------------------------------------------------------
// | Author: luofei614 <weibo.com/luofei614>
// +----------------------------------------------------------------------
namespace Think\Storage\Driver;
use Think\Storage;
namespace think\storage\driver;
use think\storage;
// SAE环境文件写入存储类
class Sae extends Storage{

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Template\Driver;
use Think\Exception;
namespace think\template\driver;
use think\exception;
class File {
// 写入编译缓存

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Template;
namespace think\template;
/**
* ThinkPHP标签库TagLib解析基类

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Template\Taglib;
use Think\Template\Taglib;
namespace think\template\taglib;
use think\template\taglib;
/**
* CX标签库解析类

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\View\Driver;
use Think\Template;
namespace think\view\driver;
use think\template;
class Think {
private $template = null;