修正traits引入

This commit is contained in:
thinkphp
2016-01-04 17:46:11 +08:00
parent 27cd0b4c96
commit 48bccf66c2
5 changed files with 19 additions and 19 deletions

View File

@@ -11,13 +11,13 @@
namespace think; namespace think;
T('controller/view'); T('controller/View');
T('controller/jump'); T('controller/Jump');
class Controller class Controller
{ {
use \traits\controller\jump; use \traits\controller\Jump;
use \traits\controller\view; use \traits\controller\View;
/** /**
* 前置操作方法列表 * 前置操作方法列表

View File

@@ -11,11 +11,11 @@
namespace think\model; namespace think\model;
T('model/adv'); T('model/Adv');
T('model/query'); T('model/Query');
class Adv extends \think\model class Adv extends \think\Model
{ {
use \traits\model\adv; use \traits\model\Adv;
use \traits\model\query; use \traits\model\Query;
} }

View File

@@ -13,15 +13,15 @@ namespace think\model;
use think\Lang; use think\Lang;
use think\Loader; use think\Loader;
T('modle/adv'); T('modle/Adv');
/** /**
* MongoModel模型类 * MongoModel模型类
* 实现了ODM和ActiveRecords模式 * 实现了ODM和ActiveRecords模式
*/ */
class Mongo extends \Think\Model class Mongo extends \think\Model
{ {
use \traits\model\adv; use \traits\model\Adv;
// 主键类型 // 主键类型
const TYPE_OBJECT = 1; const TYPE_OBJECT = 1;
@@ -243,7 +243,7 @@ class Mongo extends \Think\Model
if (true !== $sepa) { if (true !== $sepa) {
// 当sepa指定为true的时候 返回所有数据 // 当sepa指定为true的时候 返回所有数据
$options['limit'] = is_numeric($sepa) ? $sepa : 1; $options['limit'] = is_numeric($sepa) ? $sepa : 1;
} }
// 查找一条记录 // 查找一条记录
$result = $this->db->find($options); $result = $this->db->find($options);
if (!empty($result)) { if (!empty($result)) {

View File

@@ -11,8 +11,8 @@
namespace think\model; namespace think\model;
T('model/relation'); T('model/Relation');
class Relation extends \think\model class Relation extends \think\Model
{ {
use \traits\model\relation; use \traits\model\Relation;
} }

View File

@@ -11,8 +11,8 @@
namespace think\model; namespace think\model;
T('model/view'); T('model/View');
class View extends \think\model class View extends \think\Model
{ {
use \traits\model\view; use \traits\model\View;
} }