Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/../lang/../vendor/symfony/finder/Iterator
الملفات الموجودة في هذا الـ Path:
.
..
CustomFilterIterator.php
DateRangeFilterIterator.php
DepthRangeFilterIterator.php
ExcludeDirectoryFilterIterator.php
FileTypeFilterIterator.php
FilecontentFilterIterator.php
FilenameFilterIterator.php
LazyIterator.php
MultiplePcreFilterIterator.php
PathFilterIterator.php
RecursiveDirectoryIterator.php
SizeRangeFilterIterator.php
SortableIterator.php
VcsIgnoredFilterIterator.php

مشاهدة ملف: LazyIterator.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Finder\Iterator;

/**
 * @author Jérémy Derussé <jeremy@derusse.com>
 *
 * @internal
 */
class LazyIterator implements \IteratorAggregate
{
    private \Closure $iteratorFactory;

    public function __construct(callable $iteratorFactory)
    {
        $this->iteratorFactory = $iteratorFactory(...);
    }

    public function getIterator(): \Traversable
    {
        yield from ($this->iteratorFactory)();
    }
}