\Symfony\Component\Finder\IteratorMultiplePcreFilterIterator

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

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
isAccepted()
isRegex()
toRegex()
$matchRegexps
$noMatchRegexps
N/A
No private methods found
No private properties found
N/A

Properties

$matchRegexps

$matchRegexps : 

Type

$noMatchRegexps

$noMatchRegexps : 

Type

Methods

__construct()

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

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

isAccepted()

isAccepted(string  $string) : boolean

Checks whether the string is accepted by the regex filters.

If there is no regexps defined in the class, this method will accept the string. Such case can be handled by child classes before calling the method if they want to apply a different behavior.

Parameters

string $string

The string to be matched against filters

Returns

boolean

isRegex()

isRegex(string  $str) : boolean

Checks whether the string is a regex.

Parameters

string $str

Returns

boolean —

Whether the given string is a regex

toRegex()

toRegex(string  $str) : string

Converts string into regexp.

Parameters

string $str

Pattern

Returns

string —

regexp corresponding to a given string