PATH:
home
/
lab2454c
/
westernclear.net
/
vendor
/
symfony
/
finder
/
Iterator
<?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; use Symfony\Component\Finder\Comparator\NumberComparator; /** * SizeRangeFilterIterator filters out files that are not in the given size range. * * @author Fabien Potencier <fabien@symfony.com> * * @extends \FilterIterator<string, \SplFileInfo> */ class SizeRangeFilterIterator extends \FilterIterator { private array $comparators = []; /** * @param \Iterator<string, \SplFileInfo> $iterator * @param NumberComparator[] $comparators */ public function __construct(\Iterator $iterator, array $comparators) { $this->comparators = $comparators; parent::__construct($iterator); } /** * Filters the iterator values. */ public function accept(): bool { $fileinfo = $this->current(); if (!$fileinfo->isFile()) { return true; } $filesize = $fileinfo->getSize(); foreach ($this->comparators as $compare) { if (!$compare->test($filesize)) { return false; } } return true; } }
[-] ExcludeDirectoryFilterIterator.php
[edit]
[-] LazyIterator.php
[edit]
[-] SizeRangeFilterIterator.php
[edit]
[-] SortableIterator.php
[edit]
[+]
..
[-] FilenameFilterIterator.php
[edit]
[-] PathFilterIterator.php
[edit]
[-] VcsIgnoredFilterIterator.php
[edit]
[-] CustomFilterIterator.php
[edit]
[-] MultiplePcreFilterIterator.php
[edit]
[-] FileTypeFilterIterator.php
[edit]
[-] DateRangeFilterIterator.php
[edit]
[-] DepthRangeFilterIterator.php
[edit]
[-] FilecontentFilterIterator.php
[edit]
[-] RecursiveDirectoryIterator.php
[edit]