/** * find the files in the result set from a RegexIterator * * @param RegexIterator $iter * the iterator to filter on * @return \Iterator */ public static function fromRegexIterator(RegexIterator $iter) { foreach ($iter as $match) { if (IsFile::checkString($match[0])) { (yield $match[0]); } } }