改名
This commit is contained in:
@@ -39,6 +39,13 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
|
||||
|
||||
protected ActiveQuery $query;
|
||||
|
||||
|
||||
public function clean()
|
||||
{
|
||||
unset($this->query, $this->model, $this->_item);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Collection constructor.
|
||||
*
|
||||
|
||||
@@ -27,6 +27,12 @@ class CollectionIterator extends \ArrayIterator
|
||||
private ActiveQuery $query;
|
||||
|
||||
|
||||
public function clean()
|
||||
{
|
||||
unset($this->query);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* CollectionIterator constructor.
|
||||
* @param $model
|
||||
|
||||
@@ -51,6 +51,16 @@ class Pagination extends Component
|
||||
}
|
||||
|
||||
|
||||
public function clean()
|
||||
{
|
||||
unset($this->activeQuery, $this->_callback, $this->_group);
|
||||
$this->_offset = 0;
|
||||
$this->_limit = 100;
|
||||
$this->_max = 0;
|
||||
$this->_length = 0;;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array|Closure $callback
|
||||
* @throws Exception
|
||||
|
||||
@@ -44,6 +44,7 @@ class Relation extends Component
|
||||
* @param string $identification
|
||||
* @param $localValue
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function first(string $identification, $localValue): mixed
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user