部分类库从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> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// $Id$
namespace Think; namespace Org;
class Crypt { class Crypt {
/** /**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -15,7 +15,7 @@
* 应用到ThinkPHP中因而修改为ThinkPHP规范的命名空间 * 应用到ThinkPHP中因而修改为ThinkPHP规范的命名空间
*/ */
# namespace Michelf; # namespace Michelf;
namespace Think\Parser\Driver; namespace Org\Parser\Driver;
# #
# The following two constants are deprecated: avoid using them, they'll # The following two constants are deprecated: avoid using them, they'll

View File

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

View File

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

View File

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

View File

@@ -16,9 +16,10 @@ define('MAGIC_QUOTES_GPC',false);
define('THINK_VERSION', '4.0beta'); define('THINK_VERSION', '4.0beta');
// 系统常量 // 系统常量
defined('THINK_PATH') or define('THINK_PATH', dirname(__FILE__).'/'); 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('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('RUNTIME_PATH') or define('RUNTIME_PATH', realpath(APP_PATH).'/Runtime/');
defined('DATA_PATH') or define('DATA_PATH', RUNTIME_PATH.'Data/'); defined('DATA_PATH') or define('DATA_PATH', RUNTIME_PATH.'Data/');
defined('LOG_PATH') or define('LOG_PATH', RUNTIME_PATH.'Log/'); defined('LOG_PATH') or define('LOG_PATH', RUNTIME_PATH.'Log/');