改名
This commit is contained in:
@@ -111,7 +111,6 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws ComponentException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getModel(): ActiveRecord
|
public function getModel(): ActiveRecord
|
||||||
|
|||||||
@@ -57,13 +57,7 @@ class CollectionIterator extends \ArrayIterator
|
|||||||
*/
|
*/
|
||||||
protected function newModel($current): ActiveRecord
|
protected function newModel($current): ActiveRecord
|
||||||
{
|
{
|
||||||
/** @var ActiveRecord|string $model */
|
return $this->model::populate($current);
|
||||||
$model = $this->model;
|
|
||||||
if (is_object($model)) {
|
|
||||||
$model = get_class($model);
|
|
||||||
}
|
|
||||||
$model = new $model();
|
|
||||||
return $model->setAttributes($current);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user