classes/phing/filters/LineContains.php

\Contains

Holds a contains element.

package
phing.filters

Properties

Propertyprivatestring  $_value= ''

Details
Type
string

Methods

methodpublic  getValue( ) : string
Returns 'contains' value.
Returns
Type Description
string
methodpublic  setValue( string $contains ) :
Set 'contains' value.
Parameters
Name Type Description
$contains string

\LineContains

Filter which includes only those lines that contain all the user-specified strings.

Example:


  
  

Or:


   
   

This will include only those lines that contain foo and bar.

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

Constants

Constantstring  CONTAINS_KEY = 'contains'

The parameter name for the string to match on.

string

Properties

Propertyprivatearray  $_contains= 'array'

Array of Contains objects.

Default valuearrayDetails
Type
array
Propertyprivatestring  $_line= 'null'

[Deprecated]

Default valuenullDetails
Type
string

Methods

methodprivate  _initialize( ) :
Parses the parameters to add user-defined contains strings.
methodpublic  chain( object $reader ) : object
Creates a new LineContains 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  createContains( ) : \Contains
Adds a contains nested element.
Returns
Type Description
\Contains
methodpublic  getContains( ) : array
Returns the vector of words 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  readChar( ) : \the
[Deprecated. For reference only, used to be read() method.] Returns the next character in the filtered stream, only including lines from the original stream which contain all of the specified words.
Returns
Type Description
\the
Details
exception
IOException if the underlying stream throws an IOException during reading
methodpublic  setContains( array $contains ) :
Sets the array of words which must be contained within a line read from the original stream in order for it to match this filter.
Parameters
Name Type Description
$contains array

An array of words 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.