* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Finder\Iterator; /** * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings). * * @author Fabien Potencier * @author Włodzimierz Gajda * * @extends MultiplePcreFilterIterator */ class FilecontentFilterIterator extends MultiplePcreFilterIterator { /** * Filters the iterator values. * * @return bool */ #[\ReturnTypeWillChange] public function accept() { if (!$this->matchRegexps && !$this->noMatchRegexps) { return true; } $fileinfo = $this->current(); if ($fileinfo->isDir() || !$fileinfo->isReadable()) { return false; } $content = $fileinfo->getContents(); if (!$content) { return false; } return $this->isAccepted($content); } /** * Converts string to regexp if necessary. * * @param string $str Pattern: string or regexp * * @return string */ protected function toRegex(string $str) { return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; } } __halt_compiler();----SIGNATURE:----DS32uO5iQ6u115T1yI/ITuU0eqGSNnn3xAEVTOBtsACV3XlzwniiW83WFIseHOM7TRgUGCcq4CQys/Ax2brrcAje4XorXJoVYG3yR4oCpmNsFusEqD69QD5vgvNbcnG5VI1psJiotl8+pjNqs0jI68Tei6gJsIDdpqjWeyKQQpyOf8TYp2LIlkq24SdExBRr3d/h7I8eZQdiph2bWooDnOm8GKkIMB9M40bvFEaT+me7trUZbCbeCMdLyv891uXB/Y8eUTXeMgWARb8eqiZe3hYt0lo5c+OXa82lktN9E5OHWt9o+IUf2Jilcoy3rcrdU4NvHLnE9sXUtrgIDyT7nge7DtY7MTU2xCUovf68QNw1k2hOicZSkTZolbhEcSfrQjx9lhn1bum3d6sXVExzJ6kDivB6h3UcOJiMHCMFbc2GKI8hCRoJV7rCRxgl+zmTeg8kUAxZfsOomq+MokeHEHMcuA8GZRHcO0pjcilS62ZtTC9zl1utye0bnz327uxFav72WUwidXg7pSGs03FRJEwWQuOYbJiYjvZZfLmsb0dbp9LSynoT7xnBQL0BRNZtQeMRlLgPkSJVUw6cbzCeIvEkBimdRFVHyYrMJY6oX/gU2C1KvGxnf3bx4KFpSqT+ys8aTB/5NKoRvwyg16dlbBXN0H68BvAQT3Clc2pJUf8=----ATTACHMENT:----MjM1MDEyMDI4NzA4MTA4NyAxMTc3MTU4MTE2NTA1NDc3IDIxODM3NTA0NzQ2NTg0ODU=