注释完善

This commit is contained in:
thinkphp
2016-12-05 12:01:35 +08:00
parent 5037c64f53
commit 1f53806272
3 changed files with 12 additions and 23 deletions

View File

@@ -186,7 +186,7 @@ class BelongsToMany extends Relation
* @param string $foreignKey 关联模型关联键 * @param string $foreignKey 关联模型关联键
* @param string $localKey 当前模型关联键 * @param string $localKey 当前模型关联键
* @param array $condition 关联查询条件 * @param array $condition 关联查询条件
* @return \think\db\Query|string * @return Query
*/ */
protected function belongsToManyQuery($table, $foreignKey, $localKey, $condition = []) protected function belongsToManyQuery($table, $foreignKey, $localKey, $condition = [])
{ {

View File

@@ -54,19 +54,6 @@ class HasManyThrough extends Relation
return $this->select(); return $this->select();
} }
/**
* 预载入关联查询
* @access public
* @param Query $query 查询对象
* @param string $relation 关联名
* @param bool $first 是否需要使用基础表
* @return void
*/
public function eagerly(Query $query, $relation, $subRelation, $closure, $first)
{
}
/** /**
* 预载入关联查询 * 预载入关联查询
* @access public * @access public
@@ -79,7 +66,6 @@ class HasManyThrough extends Relation
*/ */
public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class) public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class)
{ {
} }
/** /**
@@ -94,7 +80,6 @@ class HasManyThrough extends Relation
*/ */
public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class) public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class)
{ {
} }
/** /**

View File

@@ -73,12 +73,14 @@ class MorphTo extends Relation
} }
/** /**
* 预载入关联查询 返回数据集 * 预载入关联查询
* @access public * @access public
* @param array $resultSet 数据集 * @param array $resultSet 数据集
* @param string $relation 关联名 * @param string $relation 当前关联名
* @param string $subRelation 子关联名
* @param \Closure $closure 闭包
* @param string $class 数据集对象名 为空表示数组 * @param string $class 数据集对象名 为空表示数组
* @return array * @return void
*/ */
public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class) public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class)
{ {
@@ -116,12 +118,14 @@ class MorphTo extends Relation
} }
/** /**
* 预载入关联查询 返回模型对象 * 预载入关联查询
* @access public * @access public
* @param Model $result 数据对象 * @param Model $result 数据对象
* @param string $relation 关联名 * @param string $relation 当前关联名
* @param string $subRelation 子关联名
* @param \Closure $closure 闭包
* @param string $class 数据集对象名 为空表示数组 * @param string $class 数据集对象名 为空表示数组
* @return Model * @return void
*/ */
public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class) public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class)
{ {
@@ -139,7 +143,7 @@ class MorphTo extends Relation
* @param array $where 关联预查询条件 * @param array $where 关联预查询条件
* @param string $relation 关联名 * @param string $relation 关联名
* @param string $subRelation 子关联 * @param string $subRelation 子关联
* @return array * @return void
*/ */
protected function eagerlyMorphToOne($model, $relation, &$result, $subRelation = '') protected function eagerlyMorphToOne($model, $relation, &$result, $subRelation = '')
{ {