删除Query类的scope方法

This commit is contained in:
thinkphp
2016-04-16 21:51:02 +08:00
parent 1487ee6eac
commit c9e23e61b6
2 changed files with 1 additions and 17 deletions

View File

@@ -684,6 +684,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
* 命名范围
* @access public
* @param string|Closure $name 命名范围名称 逗号分隔
* @param mixed $params 参数调用
* @return \think\Model
*/
public static function scope($name, $params = [])

View File

@@ -788,23 +788,6 @@ class Query
return isset($this->bind[$key]);
}
/**
* 调用命名范围
* @access public
* @param Closure $scope 命名范围 闭包定义
* @param mixed $args 参数
* @return $this
*/
public function scope($scope = '', $args = null)
{
if ($scope instanceof \Closure) {
call_user_func_array($scope, [ & $this, $args]);
} elseif ($scope instanceof Query) {
return $scope;
}
return $this;
}
/**
* 查询参数赋值
* @access public