更正Org命名空间

This commit is contained in:
Haotong Lin
2015-12-07 21:17:22 +08:00
parent d7e920c6b6
commit 6be0caaeaa
31 changed files with 116 additions and 83 deletions

View File

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

View File

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

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace think;
namespace org;
/* 缩略图相关常量定义 */
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 org\image\driver;
use Exception;
@@ -17,21 +17,26 @@ class Gd
{
/**
* 图像资源对象
*
* @var resource
*/
private $im;
/**
* @var $git \think\image\driver\Gif
* @var $git org\image\driver\Gif
*/
private $gif;
/**
* 图像信息,包括 width, height, type, mime, size
*
* @var array
*/
private $info;
/**
* 构造方法,可用于打开一张图像
*
* @param string $imgname 图像路径
*/
public function __construct($imgname = null)

View File

@@ -9,23 +9,27 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace think\image\driver;
namespace org\image\driver;
class Gif
{
/**
* GIF帧列表
*
* @var array
*/
private $frames = [];
/**
* 每帧等待时间列表
*
* @var array
*/
private $delays = [];
/**
* 构造方法用于解码GIF图片
*
* @param string $src GIF图片数据
* @param string $mod 图片数据类型
*/
@@ -49,6 +53,7 @@ class Gif
/**
* 设置或获取当前帧的数据
*
* @param string $stream 二进制数据流
* @return mixed 获取到的数据
*/
@@ -57,13 +62,13 @@ class Gif
if (is_null($stream)) {
$current = current($this->frames);
return false === $current ? reset($this->frames) : $current;
} else {
$this->frames[key($this->frames)] = $stream;
}
$this->frames[key($this->frames)] = $stream;
}
/**
* 将当前帧移动到下一帧
*
* @return string 当前帧数据
*/
public function nextImage()
@@ -73,6 +78,7 @@ class Gif
/**
* 编码并保存当前GIF图片
*
* @param string $gifname 图片名称
*/
public function save($gifname)

View File

@@ -9,7 +9,7 @@
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace think\image\driver;
namespace org\image\driver;
use think\Lang;
@@ -17,18 +17,21 @@ class Imagick
{
/**
* 图像资源对象
*
* @var resource
*/
private $im;
/**
* 图像信息,包括 width, height, type, mime, size
*
* @var array
*/
private $info;
/**
* 构造方法,可用于打开一张图像
*
* @param string $imgname 图像路径
*/
public function __construct($imgname = null)
@@ -41,6 +44,7 @@ class Imagick
/**
* 打开一张图像
*
* @param string $imgname 图像路径
*/
public function open($imgname)
@@ -67,6 +71,7 @@ class Imagick
/**
* 保存图像
*
* @param string $imgname 图像保存名称
* @param string $type 图像类型
* @param boolean $interlace 是否对JPEG类型图像设置隔行扫描
@@ -104,6 +109,7 @@ class Imagick
/**
* 返回图像宽度
*
* @return integer 图像宽度
*/
public function width()
@@ -117,6 +123,7 @@ class Imagick
/**
* 返回图像高度
*
* @return integer 图像高度
*/
public function height()
@@ -130,6 +137,7 @@ class Imagick
/**
* 返回图像类型
*
* @return string 图像类型
*/
public function type()
@@ -143,6 +151,7 @@ class Imagick
/**
* 返回图像MIME类型
*
* @return string 图像MIME类型
*/
public function mime()
@@ -156,6 +165,7 @@ class Imagick
/**
* 返回图像尺寸数组 0 - 图像宽度1 - 图像高度
*
* @return array 图像尺寸
*/
public function size()
@@ -169,6 +179,7 @@ class Imagick
/**
* 裁剪图像
*
* @param integer $w 裁剪区域宽度
* @param integer $h 裁剪区域高度
* @param integer $x 裁剪区域x坐标
@@ -204,7 +215,10 @@ class Imagick
}
}
/* 裁剪图片,内部调用 */
/**
* 裁剪图片,内部调用
*
*/
private function _crop($w, $h, $x, $y, $width, $height, $img = null)
{
is_null($img) && $img = $this->im;
@@ -228,6 +242,7 @@ class Imagick
/**
* 生成缩略图
*
* @param integer $width 缩略图最大宽度
* @param integer $height 缩略图最大高度
* @param integer $type 缩略图裁剪类型
@@ -364,7 +379,10 @@ class Imagick
$this->crop($w, $h, $x, $y, $width, $height);
}
/* 填充指定图像,内部使用 */
/**
* 填充指定图像,内部使用
*
*/
private function _fill($newimg, $posx, $posy, $neww, $newh, $img = null)
{
is_null($img) && $img = $this->im;
@@ -381,6 +399,7 @@ class Imagick
/**
* 添加水印
*
* @param string $source 水印图片路径
* @param integer $locate 水印位置
* @param integer $alpha 水印透明度
@@ -493,6 +512,7 @@ class Imagick
/**
* 图像添加文字
*
* @param string $text 添加的文字
* @param string $font 字体路径
* @param integer $size 字号
@@ -633,9 +653,11 @@ class Imagick
/**
* 析构方法,用于销毁图像资源
*
*/
public function __destruct()
{
empty($this->im) || $this->im->destroy();
}
}

View File

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

View File

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

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,9 +9,9 @@
// | 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
{

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think;
namespace org;
// 内容解析类
class Parser

View File

@@ -13,7 +13,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

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think;
namespace org;
// 内容解析类
use think\Exception as Exception;

View File

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

View File

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

View File

@@ -9,9 +9,9 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think;
namespace org;
use think\Image;
use org\Image;
class Upload
{

View File

@@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think;
namespace org;
use think\Lang;