Cake\Database\Query::getIterator PHP Метод

getIterator() публичный Метод

Executes this query and returns a results iterator. This function is required for implementing the IteratorAggregate interface and allows the query to be iterated without having to call execute() manually, thus making it look like a result set instead of the query itself.
public getIterator ( ) : Iterator
Результат Iterator
    public function getIterator()
    {
        if (empty($this->_iterator) || $this->_dirty) {
            $this->_iterator = $this->execute();
        }
        return $this->_iterator;
    }