Возвращает внутренний объект итератора для перебора содержимого данной папки.

@return \DirectoryIterator
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;
    }
185729
public function getIterator()
    {
        $iterator   = parent::getIterator();
        $content    = $this->getDependentContent();

        if ( $content )
        {
            $iterator->append( new ArrayIterator( array(
                'rootCreated'   => $content->created,
                'rootUserId'    => $content->userId,
            ) ) );
        }

        return $iterator;
    }
1117154
public function listFiles()
    {
        $innerIterator = new \FilesystemIterator($this->getAbsolutePath());
        $innerIterator->setInfoClass(get_class($this));
        $iterator = new FileFilterType($innerIterator, 'file');
        return $iterator;
    }
314412
public function getIterator()
    {
        $chars = array();

        for ($i = 0, $l = $this->getLength(); $i < $l; $i++)
        {
            $chars[] = $this[$i];
        }

        return new \ArrayIterator($chars);
    }
1218435
public function getIterator()
    {
        $result = new AppendIterator;
        $result->append( $this->getBaseIterator() );
        $result->append( $this->getPropertiesIterator() );
        return $result;
    }
528173
protected function _getIterator()
    {
        if (is_null($this->iterator)) {
            $this->iterator = $this->_resolveIterator($this->_getDataStore());
        }

        return $this->iterator;
    }
728079
public function getList()
	{
		if( $this->pattern )
			return new FS_Folder_RegexFilter(
				$this->path,
				$this->pattern,
				$this->showFiles,
				$this->showFolders,
				$this->stripDotEntries
			);
		return new FS_Folder_Iterator(
			$this->path,
			$this->showFiles,
			$this->showFolders,
			$this->stripDotEntries
		);
	}
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;
    }
759037
public function getIterator()
    {
        $this->reset();

        foreach ($this->iterator as $key => $value) {
            $this->position++;
            yield $key => $value;
        }
    }
1273423
public function getIterator()
    {
        $queue = new \SplPriorityQueue();

        $this->workers->rewind();
        while($this->workers->valid()) {

            $queue->insert(
                $this->workers->current(),
                $this->workers->getInfo()
            );

            $this->workers->next();
        }

        return $queue;
    }
923368
public function getIterator(): \Traversable
    {
        if ($this->elements instanceof \Iterator) {
            return $this->elements;
        }

        if ($this->elements instanceof \Traversable) {
            return new \IteratorIterator($this->elements);
        }

        return new \ArrayIterator($this->elements);
    }
43225
public function getIterator()
    {
        // Return an iterator just like the old iteration of the HistoryPlugin for BC compatibility (use getAll())
        return new \ArrayIterator(array_map(function ($entry) {
            $entry['request']->getParams()->set('actual_response', $entry['response']);
            return $entry['request'];
        }, $this->transactions));
    }
240874
public function getIterator()
    {
        if ( null === $this->domainIterator )
        {
            /* @var $siteInfo \Zork\Db\SiteInfo */
            /* @var $moduleManager \Zend\ModuleManager\ModuleManagerInterface */
            $serviceLocator = $this->getServiceLocator();
            $siteInfo       = $serviceLocator->get( 'Zork\Db\SiteInfo' );
            $siteId         = $siteInfo->getSiteId();
            $moduleManager  = $serviceLocator->get(
                'Zend\ModuleManager\ModuleManagerInterface'
            );

            if ( $siteId && in_array( 'Grid\MultisitePlatform',
                                      $moduleManager->getModules() ) )
            {
                /* @var $domainModel \Grid\MultisitePlatform\Model\Domain\Model */
                $domains        = array();
                $domainModel    = $serviceLocator->get(
                    'Grid\MultisitePlatform\Model\Domain\Model'
                );

                foreach ( $domainModel->findAll( $siteId ) as $domain )
                {
                    if ( ! empty( $domain->domain ) )
                    {
                        $domains[] = $domain->domain;
                    }
                }
            }
            else
            {
                /* @var $dbAdapter \Zend\Db\Adapter\Adapter */
                $dbAdapter  = $serviceLocator->get( 'Zend\Db\Adapter\Adapter' );
                $config     = $dbAdapter->getDriver()
                                        ->getConnection()
                                        ->getConnectionParameters();

                if ( empty( $config['validDomains'] ) )
                {
                    $domains = array( 'localhost' );
                }
                else
                {
                    $domains = array_map(
                        'strtolower',
                        (array) $config['validDomains']
                    );
                }

                if ( ! empty( $config['defaultDomain'] ) )
                {
                    $defaultDomain = strtolower( $config['defaultDomain'] );

                    if ( ! in_array( $defaultDomain, $domains ) )
                    {
                        array_unshift( $domains, $defaultDomain );
                    }
                }
            }

            $domain = $siteInfo->getDomain();

            if ( ! in_array( $domain, $domains ) )
            {
                array_unshift( $domains, $domain );
            }

            $this->domainIterator = new ArrayIterator( $domains );
        }

        return $this->domainIterator;
    }
1270646
public function getIterator()
    {
        $isTraversal = (is_array($this->body) || $this->body instanceof \Traversable);

        return $isTraversal ? new \ArrayIterator($this->body) : new \ArrayIterator([]);
    }
937543
public function getIterator(): \Traversable
	{
		$options = [];

		foreach ($this->setOptions as $option => $value) {
			$options[$option] = $this->{'get'.ucfirst($option)}();
		}

		return new \ArrayIterator($options);
	}
439027
public function getIterator(): \Iterator
    {
        $hydrator = $this->documentManager->newHydrator($this->hydrationMode);
        $query = clone $this->query;

        if (! $query->hasParam('_source')) {
            /** @var DocumentMetadata $class */
            $class = $this->documentManager->getClassMetadata($this->documentClass);
            $query->setSource($class->eagerFieldNames);
        }

        if (null !== $this->sort) {
            $query->setSort($this->sort);
        }

        if (null !== $this->limit) {
            $query->setSize($this->limit);
        }

        if (null !== $this->offset) {
            $query->setFrom($this->offset);
        }

        $generator = null !== $this->cacheProfile ? $this->_doExecuteCached($query) : $this->_doExecute($query);
        foreach ($generator as $resultSet) {
            yield from $hydrator->hydrateAll($resultSet, $this->documentClass);
        }
    }
995183
public function getIterator()
    {
        if (is_null($this->iterator)) {
            $finder = $this->finderFactory->createFinder();
            $finder->files()->in($this->path);

            if (false === empty($this->extensions)) {
                $finder->name($this->getExtensionsRegex());
            }

            $this->iterator = $finder->getIterator();
        }

        return $this->iterator;
    }