修正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;
T('controller/view');
T('controller/jump');
T('controller/View');
T('controller/Jump');
class Controller
{
use \traits\controller\jump;
use \traits\controller\view;
use \traits\controller\Jump;
use \traits\controller\View;
/**
* 前置操作方法列表

View File

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

View File

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

View File

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

View File

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