Ouzo\Db\ModelQueryBuilder::fetchIterator PHP Method

fetchIterator() public method

public fetchIterator ( integer $batchSize = 500 ) : Iterator
$batchSize integer
return Iterator
    public function fetchIterator($batchSize = 500)
    {
        $iterator = QueryExecutor::prepare($this->_db, $this->_query)->fetchIterator();
        $iterator->rewind();
        return !$this->_selectModel ? $iterator : new UnbatchingIterator(new TransformingIterator(new BatchingIterator($iterator, $batchSize), array($this, '_processResults')));
    }