Create the iterator

@param  Traversable $sourceIterator
@return ModelIterator
542931
protected function createIterator(Traversable $sourceIterator) {
		$iterator = new Iterator($sourceIterator, $this->getModelClass());
		$iterator->setDatagate($this);

		if ($this->hasLocator()) {
			$iterator->setLocator($this->getLocator());
		}

		return $iterator;
	}
1263927
public function getIterator() {
		if($this->loaded == false) {
			$this->items = $this->getReferences();
			$this->loaded = true;
		}
		foreach($this->items as $i => $item) {
			if(is_array($item)) $this->items[$i] = new ArrayData($item);
		}
		return new ArrayIterator($this->items);
	}
30212
public function getIterator(): \Traversable
    {
        return new MappingIterator(
                $this->configurations,
                function($value, $key)
                {
                    return $this->get($key);
                }
        );
    }
660346
public function getIterator(): \Traversable
    {
        if ($this->data instanceof \ArrayIterator) {
            return $this->data;
        }

        if ($this->data instanceof \IteratorAggregate) {
            return $this->data->getIterator();
        }

        if (!\is_array($this->data)) {
            throw new NotIterableException('Cannot get iterator for data');
        }

        return new \ArrayIterator($this->data);
    }
1260762
private function prepareSourceIteratorDouble($sourceIterator, $posts) {
        $sourceIterator->rewind()->will(function() use($sourceIterator, $posts) {
            $posts->rewind();
            $sourceIterator->current()->will(function() use($posts) {
                return $posts->current();
            });
            $sourceIterator->next()->will(function() use($posts) {
                return $posts->next();
            });
            $sourceIterator->valid()->will(function() use($posts) {
                return $posts->valid();
            });
            $sourceIterator->key()->will(function() use($posts) {
                return $posts->key();
            });
        });

        return $sourceIterator;
    }
298599
public function buildIterator()
    {
        $qb = $this->em->createQueryBuilder();
        $qb->select('fs')
            ->from('KunstmaanFormBundle:FormSubmission', 'fs')
            ->innerJoin('fs.node', 'n', 'WITH', 'fs.node = n.id')
            ->andWhere('n.id = :node')
            // only export the requested language, bc headers aren't translated correctly
            ->andWhere('fs.lang = :lang')
            ->setParameter('node', $this->nodeTranslation->getNode()->getId())
            ->setParameter('lang', $this->nodeTranslation->getLang())
            ->addOrderBy('fs.created', 'DESC');
        $iterableResult = $qb->getQuery()->iterate();
        $isHeaderWritten = false;

        $collection = new ArrayCollection();
        $i = 0;
        foreach ($iterableResult as $row) {
            /* @var FormSubmission $submission */
            $submission = $row[0];

            // Write row data
            $data = [
                'id' => $submission->getId(),
                'date' => $submission->getCreated()->format('d/m/Y H:i:s'),
                'language' => $submission->getLang(),
            ];
            foreach ($submission->getFields() as $field) {
                if (!$isHeaderWritten) {
                    $this->addExportField($field->getFieldName(), $this->translator->trans($field->getLabel()));
                }
                $data[$field->getFieldName()] = $field->__toString();
            }
            $isHeaderWritten = true;
            $collection->add([$data]);

            if (($i % $this->batchSize) === 0) {
                $this->em->clear();
            }
            ++$i;
        }

        $this->iterator = $collection->getIterator();
    }
180585
public function getIterator()
    {
        $iterator   = parent::getIterator();
        $content    = $this->getDependentContent();

        if ( $content )
        {
            $iterator->append( new ArrayIterator( array(
                'rootImage' => $content->leadImage,
                'rootText'  => $content->leadText,
            ) ) );
        }

        return $iterator;
    }
1113335
public function getIterator() {
        $iterator = new AppendIterator;

        if($this->wrapped_object instanceof IteratorAggregate) {
            $iterator->append($element->getIterator());
        }
        else {
            $iterator->append(new ArrayIterator($this->wrapped_object));
        }
        $iterator->append(parent::getIterator());
        return $iterator;
    }
19736
protected function getIterator()
    {
        if ($this->iterator === null && $this->isExists()) {
            $dirIterator = new DirectoryIterator($this->getPathname());
            $this->iterator = new CallbackFilterIterator($dirIterator, function ($current, $key, $iterator) {
                return !$iterator->isDot();
            });
        }

        return $this->iterator;
    }
429268
public function getIterator(): \Traversable
    {
        $routes = $this->routes;
        usort(
                $routes,
                function(Route $a, Route $b)
                {
                    return strnatcmp($a->configuredPath(), $b->configuredPath());
                }
        );
        return new \ArrayIterator($routes);
    }
870638
public function getIterator()
    {
        $entries = array_slice($this->getResults(), $this->getCurrentOffset(), $this->getPerPage(), true);

        return new ArrayIterator($entries);
    }
1179253
public function getIterator(): \Traversable
    {
        return new MappingIterator(
                $this->connections,
                function($value, $key)
                {
                    return $this->get($key);
                }
        );
    }
290237
public function getIterator()
    {
        $results = [];
        foreach ($this->hash as $key) {
            $results[] = $this->hash[$key];
        }

        return new \ArrayIterator($results);
    }
1065544
public function getIterator()
    {
        $tagsById       = $this->container->findTaggedServiceIds($this->tag);
        $taggedServices = array();
        foreach ($tagsById as $id => $tagDefinitions) {
            /* @var $id string */
            /* @var $tagDefinitions array(array(string=>string)) */
            foreach ($tagDefinitions as $tagDefinition) {
                /* @var $tagDefinition array(string=>string) */
                $taggedServices[] = new TaggedService($id, $tagDefinition);
            }
        }
        return new \ArrayIterator($taggedServices);
    }
403903
public function getIterator() {
        $ret = array(
            'id'           => $this->id,
            'contextlevel' => $this->contextlevel,
            'instanceid'   => $this->instanceid,
            'path'         => $this->path,
            'depth'        => $this->depth,
            'locked'       => $this->locked,
        );
        return new ArrayIterator($ret);
    }
492677
public function getIterator(): \Generator
    {
        foreach ($this->sourceIterable as $content) {
            try {
                yield $this->stream->write($content);
            } catch (\InvalidArgumentException $ex) {
                throw new \RuntimeException('The iterable generated values that are not writable', 0, $ex);
            }
        }
    }
139849
public function getIterator()
    {
        if (!is_null($this->iterator)) {
            return $this->iterator;
        }

        return $this->iterator = new ArrayIterator((array) $this->value);
    }