This commit is contained in:
2020-09-08 01:09:24 +08:00
parent cbf961c4e7
commit 0cbf083621
4 changed files with 9 additions and 46 deletions
+5 -1
View File
@@ -27,14 +27,18 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
/** @var ActiveRecord */
protected $model;
protected $query;
/**
* Collection constructor.
*
* @param $query
* @param array $array
*/
public function __construct(array $array = [])
public function __construct($query, array $array = [])
{
$this->_item = $array;
$this->query = $query;
parent::__construct([]);
}