Relation类方法调整

This commit is contained in:
thinkphp
2016-12-09 14:52:37 +08:00
parent d49b986bb8
commit c5dbbb45da

View File

@@ -13,6 +13,7 @@ namespace think\model;
use think\db\Query;
use think\Exception;
use think\Model;
abstract class Relation
{
@@ -40,15 +41,27 @@ abstract class Relation
/**
* 获取关联的所属模型
* @access public
* @return Model
*/
public function getModel()
public function getParent()
{
return $this->parent;
}
/**
* 获取当前的关联模型类
* @access public
* @return string
*/
public function getModel()
{
return $this->model;
}
/**
* 获取关联的查询对象
* @access public
* @return Query
*/
public function getQuery()
{