TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MultiplePcreFilterIterator Class Reference
Inheritance diagram for MultiplePcreFilterIterator:
FilterIterator FilecontentFilterIterator FilenameFilterIterator PathFilterIterator TestMultiplePcreFilterIterator

Public Member Functions

 __construct (\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
 
- Public Member Functions inherited from FilterIterator
 rewind ()
 

Protected Member Functions

 isRegex ($str)
 
 toRegex ($str)
 

Protected Attributes

 $matchRegexps = array()
 
 $noMatchRegexps = array()
 

Detailed Description

MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings).

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 21 of file MultiplePcreFilterIterator.php.

Constructor & Destructor Documentation

__construct ( \Iterator  $iterator,
array  $matchPatterns,
array  $noMatchPatterns 
)

Constructor.

Parameters
\Iterator$iteratorThe Iterator to filter
array$matchPatternsAn array of patterns that need to match
array$noMatchPatternsAn array of patterns that need to not match

Definition at line 33 of file MultiplePcreFilterIterator.php.

References MultiplePcreFilterIterator\toRegex().

Member Function Documentation

isRegex (   $str)
protected

Checks whether the string is a regex.

Parameters
string$str
Returns
bool Whether the given string is a regex

Definition at line 53 of file MultiplePcreFilterIterator.php.

References Expression\create().

Referenced by PathFilterIterator\toRegex(), and FilecontentFilterIterator\toRegex().

toRegex (   $str)
abstractprotected

Converts string into regexp.

Parameters
string$strPattern
Returns
string regexp corresponding to a given string

Referenced by MultiplePcreFilterIterator\__construct().

Member Data Documentation

$matchRegexps = array()
protected

Definition at line 23 of file MultiplePcreFilterIterator.php.

$noMatchRegexps = array()
protected

Definition at line 24 of file MultiplePcreFilterIterator.php.