Class ParallelRegex

Description

Compounded regular expression. Any of the contained patterns could match and when one does, it's label is returned.

Located in /_tests/simpletest/parser.php (line 28)


	
			
Variable Summary
mixed $_case
mixed $_labels
mixed $_patterns
mixed $_regex
Method Summary
ParallelRegex ParallelRegex (boolean $case)
void addPattern (string $pattern, [string $label = true])
boolean match (string $subject,  &$match, string $match)
Variables
mixed $_case (line 32)
mixed $_labels (line 30)
mixed $_patterns (line 29)
mixed $_regex (line 31)
Methods
Constructor ParallelRegex (line 40)

Constructor. Starts with no patterns.

  • access: public
ParallelRegex ParallelRegex (boolean $case)
  • boolean $case: True for case sensitive, false for insensitive.
addPattern (line 55)

Adds a pattern with an optional label.

  • access: public
void addPattern (string $pattern, [string $label = true])
  • string $pattern: Perl style regex, but ( and ) lose the usual meaning.
  • string $label: Label of regex to be returned on a match.
match (line 71)

Attempts to match all patterns at once against a string.

  • return: True on success.
  • access: public
boolean match (string $subject,  &$match, string $match)
  • string $subject: String to match against.
  • string $match: First matched portion of subject.
  • &$match

Documentation generated on Sun, 02 Jan 2011 23:20:49 +0000 by phpDocumentor 1.4.3