classes/phing/filters/LineContainsRegexp.php

\LineContainsRegexp

Filter which includes only those lines that contain the user-specified regular expression matching strings.

Example:


  

Or:


   

This will fetch all those lines that contain the pattern foo

Extends from
\BaseParamFilterReader
Implements
\ChainableReader
see
\FilterReader
author
Yannick Lecaillez
author
Hans Lellelid
copyright
© 2003 seasonfive. All rights reserved
package
phing.filters
version
$Revision: 526 $

Constants

Constantstring  REGEXP_KEY = 'regexp'

Parameter name for regular expression.

string

Properties

Propertyprivatearray  $_regexps= 'array'

Regular expressions that are applied against lines.

Default valuearrayDetails
Type
array

Methods

methodprivate  _initialize( ) :
Parses parameters to add user defined regular expressions.
methodpublic  chain( object $reader ) : object
Creates a new LineContainsRegExp using the passed in Reader for instantiation.
Parameters
Name Type Description
$reader object

A Reader object providing the underlying stream. Must not be null.

Returns
Type Description
object
methodpublic  createRegexp( ) : object
Adds a regexp element.
Returns
Type Description
object
methodpublic  getRegexps( ) : array
Returns the array of regular expressions which must be contained within a line read from the original stream in order for it to match this filter.
Returns
Type Description
array
methodpublic  read(  $len = null ) : mixed
Returns all lines in a buffer that contain specified strings.
Parameters
Name Type Description
$len
Returns
Type Description
mixed
methodpublic  setRegexps( \regexps $regexps ) :
Sets the vector of regular expressions which must be contained within a line read from the original stream in order for it to match this filter.
Parameters
Name Type Description
$regexps \regexps

An array of regular expressions which must be contained within a line in order for it to match in this filter. Must not be null.

Documentation was generated by DocBlox 0.13.1.