部分类库从Think命名空间移到Org

Think目录移入Library目录
This commit is contained in:
ThinkPHP
2013-04-14 19:28:21 +08:00
parent 095308ae51
commit 732a694846
87 changed files with 52 additions and 57 deletions

View File

@@ -8,8 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
namespace Think;
namespace Org;
class Crypt {
/**

View File

@@ -8,10 +8,8 @@
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
// | ThinkImage.class.php 2013-03-05
// +----------------------------------------------------------------------
namespace Think;
namespace Org;
/* 缩略图相关常量定义 */
define('THINKIMAGE_THUMB_SCALING', 1); //常量,标识缩略图等比例缩放类型
@@ -50,7 +48,7 @@ class Image {
*/
public function init($type = 'Gd', $imgname = null){
/* 引入处理库,实例化图片处理对象 */
$class = '\Think\Image\Driver\\'.ucwords($type);
$class = '\\Org\\Image\\Driver\\'.ucwords($type);
self::$im = new $class($imgname);
return self::$im;
}

View File

@@ -11,7 +11,7 @@
// | ImageGd.class.php 2013-03-05
// +----------------------------------------------------------------------
namespace Think\Image\Driver;
namespace Org\Image\Driver;
class Gd{
/**
* 图像资源对象
@@ -62,7 +62,7 @@ class Gd{
//打开图像
if('gif' == $this->info['type']){
$class = '\Think\Image\Driver\Gif';
$class = '\Org\Image\Driver\Gif';
$this->gif = new $class($imgname);
$this->im = imagecreatefromstring($this->gif->image());
} else {

View File

@@ -10,7 +10,7 @@
// +----------------------------------------------------------------------
// | GIF.class.php 2013-03-09
// +----------------------------------------------------------------------
namespace Think\Image\Driver;
namespace Org\Image\Driver;
class Gif{
/**
* GIF帧列表

View File

@@ -8,9 +8,8 @@
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
// | ImageImagick.class.php 2013-03-06
// +----------------------------------------------------------------------
namespace Think\Image\Driver;
namespace Org\Image\Driver;
class Imagick{
/**
* 图像资源对象

View File

@@ -8,8 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
namespace Think;
namespace Org;
// oauth登录接口
// <code>
// Oauth::connect('qq',['app_key'=>'','app_secret'=>'','callback'=>'','authorize'=>'']); // 链接QQ登录
@@ -33,7 +33,7 @@ class Oauth {
* @return object
*/
static public function connect($type,$options=[]) {
$class = 'Think\\Oauth\\Driver\\'.ucwords($type);
$class = 'Org\\Oauth\\Driver\\'.ucwords($type);
self::$handler = new $class($options);
return self::$handler;
}

View File

@@ -8,9 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
namespace Think\Oauth;
namespace Org\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 Org\Oauth\Driver;
use Org\Oauth\Driver;
class Baidu extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 杨维杰 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Diandian extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Douban extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Github extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Google extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Kaixin extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Msn extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Qq extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Renren extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Sina extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Sohu extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class T163 extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Taobao extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class Tencent extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -9,8 +9,8 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think\Oauth\Driver;
use Think\Oauth\Driver;
namespace Org\Oauth\Driver;
use Org\Oauth\Driver;
class X360 extends Driver{
/**
* 获取requestCode的api接口

View File

@@ -8,9 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
namespace Think;
namespace Org;
// 内容解析类
class Parser {
@@ -19,7 +18,7 @@ class Parser {
// 解析内容
static public function parse($content,$type){
if(!isset(self::$handler[$type])) {
$class = '\\Think\\Parser\\Driver\\'.ucwords($type);
$class = '\\Org\\Parser\\Driver\\'.ucwords($type);
self::$handler[$type] = new $class();
}
return self::$handler[$type]->parse($content);

View File

@@ -15,7 +15,7 @@
* 应用到ThinkPHP中因而修改为ThinkPHP规范的命名空间
*/
# namespace Michelf;
namespace Think\Parser\Driver;
namespace Org\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 Org\Parser\Driver;
class Ubb{
/**

View File

@@ -1 +0,0 @@
ThinkPHP 扩展类库目录

View File

@@ -8,8 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
namespace Think;
namespace Org;
class Upload {
protected $config = [
'max_size' => -1, // 上传文件的最大值

View File

@@ -16,9 +16,10 @@ define('MAGIC_QUOTES_GPC',false);
define('THINK_VERSION', '4.0beta');
// 系统常量
defined('THINK_PATH') or define('THINK_PATH', dirname(__FILE__).'/');
defined('CORE_PATH') or define('CORE_PATH', THINK_PATH.'Think/');
defined('APP_PATH') or define('APP_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
defined('LIB_PATH') or define('LIB_PATH', THINK_PATH.'Library/');
defined('CORE_PATH') or define('CORE_PATH', LIB_PATH.'Think/');
defined('ORG_PATH') or define('ORG_PATH', LIB_PATH.'Org/');
defined('APP_PATH') or define('APP_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
defined('RUNTIME_PATH') or define('RUNTIME_PATH', realpath(APP_PATH).'/Runtime/');
defined('DATA_PATH') or define('DATA_PATH', RUNTIME_PATH.'Data/');
defined('LOG_PATH') or define('LOG_PATH', RUNTIME_PATH.'Log/');