FilenameFilterIterator
FilenameFilterIterator
class FilenameFilterIterator extends MultiplePcreFilterIterator
FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
Methods
rewind() This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases. | from FilterIterator | |
__construct(Iterator $iterator, array $matchPatterns, array $noMatchPatterns) Constructor. | from MultiplePcreFilterIterator | |
bool | accept() Filters the iterator values. |
Details
rewind()
This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.
See also
FilterIterator::rewind() |
__construct(Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
Constructor.
Parameters
Iterator | $iterator | The Iterator to filter |
array | $matchPatterns | An array of patterns that need to match |
array | $noMatchPatterns | An array of patterns that need to not match |
bool accept()
Filters the iterator values.
Return Value
bool | true if the value should be kept, false otherwise |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Finder/Iterator/FilenameFilterIterator.html