* * 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 * * @extends \FilterIterator */ class SizeRangeFilterIterator extends \FilterIterator { private $comparators = []; /** * @param \Iterator $iterator * @param NumberComparator[] $comparators */ public function __construct(\Iterator $iterator, array $comparators) { $this->comparators = $comparators; parent::__construct($iterator); } /** * Filters the iterator values. * * @return bool */ #[\ReturnTypeWillChange] public function accept() { $fileinfo = $this->current(); if (!$fileinfo->isFile()) { return true; } $filesize = $fileinfo->getSize(); foreach ($this->comparators as $compare) { if (!$compare->test($filesize)) { return false; } } return true; } } __halt_compiler();----SIGNATURE:----e+BB8706epQgnNxOMvxwzSq4KfXiGbVoaEPLbNYI3CrULpPBjwZ2E87i69V4YoLsWdetDJJ8/xtdd7bAF9IlQ1T7HaI0mG2ASKqprsr3MNLe/Ut0atCDWAHHCIuYqcsByZdXgTaa1OCr4u4wQ9gKchS/2aTlKRecLvlvLH/HiZV5ayC01EUl0deeQX/wtGROG/qQ5SAMYJofAvXJAWafPlKN8X3TQVmXkHD+bvP1S3WYCpYVojzSvsItIpdYBXwESPYdsb+2H5BzYIh1OodSs1Q790s1aeNkHZ10M4SS6nmSPDRUrn3LY0HQZgleEZ3zdD7fiOkqMoEGlh0nrMDD+AXLvvY7MGvvsjKFfVlgRCGVrUU+dvqguQHen4pm0Gna6j9N88IcJbCuQCzAZYFMTfLUmW2vfm2Qt21e9Hso5fBuqNcgk8+wftsi2D2nBYEI3w0u9iZSaj0FswcVw26lMjSSi9F7QTCMr47jRJA/J99Ho9x37Y7dir+xzg0QkW8Nu0tBkxw9IHyAGSqKs9ZDCp1ob9vKBNpuvEk2xnIYDTatVepjXJ660LreoAQGUNYDoIa8CV7Uo8nGC1vIjhOlAC9p0brR+7kARZGGiqSQBZ+IVnCmX2Oli72rx+79/QG198Mt5qmOOw0Sl1maa+0VqqZLf8jOiu9TNeye/1Z7J2o=----ATTACHMENT:----NTAwODk3ODI3MDA4Njk0NiAzMjk5MTEyMTQ2MjIzNTEgNjExNTE1NDQ4MDUzMjE1OA==