types/selectors/ContainsSelector.php

Show: inherited
Table of Contents

Selector that filters files based on whether they contain a particular string.

Author
Hans Lellelid (Phing)  
Author
Bruce Atherton (Ant)  
Package
phing.types.selectors  

\ContainsSelector

Package: phing\types\selectors

Selector that filters files based on whether they contain a particular string.

Parent(s)
\BaseExtendSelector < \BaseSelector < \DataType < \ProjectComponent
Author
Hans Lellelid (Phing)  
Author
Bruce Atherton (Ant)  

Constants

Constant  CONTAINS_KEY = "text"
Constant  CASE_KEY = "casesensitive"

Properties

Propertyprivate  $casesensitive= 'true'
Default valuetrueDetails
Type
n/a
Propertyprivate  $contains= 'null'
Default valuenullDetails
Type
n/a

Methods

methodpubliccircularReference( ) : void

methodpublicdieOnCircularReference( ) : void

methodpublicgetCheckedRef( ) : void

methodpublicgetDescription( ) : void

methodpublicgetError( ) : void

methodprotectedgetParameters( ) : void

methodpublicgetProject( ) : void

methodpublicisReference( ) : void

methodpublicisSelected( \basedir $basedir, \filename $filename, \file $file ) : \whether

The heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset.

Parameters
Name Type Description
$basedir \basedir

the base directory the scan is being done from

$filename \filename

is the name of the file to check

$file \file

a PhingFile object the selector can use

Returns
Type Description
\whether the file should be selected or not
methodpubliclog( ) : void

methodpublicnoChildrenAllowed( ) : void

methodpublicparsingComplete( ) : void

methodpublicsetCasesensitive( boolean $casesensitive ) : void

Whether to ignore case in the string being searched.

Parameters
Name Type Description
$casesensitive boolean

whether to pay attention to case sensitivity

methodpublicsetDescription( ) : void

methodpublicsetError( ) : void

methodpublicsetParameters( array $parameters ) : void

When using this as a custom selector, this method will be called.

It translates each parameter into the appropriate setXXX() call.

Parameters
Name Type Description
$parameters array

the complete set of parameters for this selector

methodpublicsetProject( ) : void

methodpublicsetRefid( ) : void

methodpublicsetText( string $contains ) : void

The string to search for within a file.

Parameters
Name Type Description
$contains string

the string that a file must contain to be selected.

methodpublictoString( ) : void

methodpublictooManyAttributes( ) : void

methodpublicvalidate( ) : void

methodpublicverifySettings( ) : void

Checks to make sure all settings are kosher. In this case, it means that the pattern attribute has been set.

Documentation was generated by DocBlox 0.17.1.