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;
    }