Documentation

TestMultiplePcreFilterIterator extends MultiplePcreFilterIterator
in package

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

Table of Contents

Properties

$matchRegexps  : mixed
$noMatchRegexps  : mixed

Methods

__construct()  : mixed
Constructor.
accept()  : mixed
isRegex()  : bool
Checks whether the string is a regex.
rewind()  : mixed
This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.
toRegex()  : string
Converts string into regexp.
isAccepted()  : bool
Checks whether the string is accepted by the regex filters.

Properties

Methods

isRegex()

Checks whether the string is a regex.

public isRegex(mixed $str) : bool
Parameters
$str : mixed
Return values
bool

Whether the given string is a regex

rewind()

This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.

public rewind() : mixed
Tags
see
FilterIterator::rewind()

toRegex()

Converts string into regexp.

public toRegex(mixed $str) : string
Parameters
$str : mixed

Pattern

Return values
string

regexp corresponding to a given string

isAccepted()

Checks whether the string is accepted by the regex filters.

protected isAccepted(string $string) : bool

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

Return values
bool

        
On this page

Search results