types/selectors/ContainsRegexpSelector.php
\ContainsRegexpSelector
Selector that filters files based on whether they contain a particular string using regexp.
It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
- Parent(s)
- \BaseExtendSelector < \BaseSelector < \DataType < \ProjectComponent
- Author
- Hans Lellelid
(Phing) - Author
- Bruce Atherton
(Ant) - Version
- $Revision: 526 $
Constants
Properties

$parameters= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \BaseExtendSelector::$$parameters
Methods

dieOnCircularReference(
)
:
void
getParameters(
)
:
\theAllows access to the parameters gathered and set within the <custom> tag.
Inherited from: \BaseExtendSelector::getParameters()| Type | Description |
|---|---|
| \the | set of parameters defined for this selector |

isSelected(
\basedir $basedir, \filename $filename, \file $file
)
:
\whetherThe heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset.
| 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 |
| Type | Description |
|---|---|
| \whether | the file should be selected or not |

setCasesensitive(
boolean $casesensitive
)
:
voidWhether to ignore case in the regex match.
| Name | Type | Description |
|---|---|---|
| $casesensitive | boolean | whether to pay attention to case sensitivity |

setExpression(
string $exp
)
:
voidThe expression to match on within a file.
| Name | Type | Description |
|---|---|---|
| $exp | string | the string that a file must contain to be selected. |

setParameters(
array $parameters
)
:
voidWhen using this as a custom selector, this method will be called.
It translates each parameter into the appropriate setXXX() call.
| Name | Type | Description |
|---|---|---|
| $parameters | array | the complete set of parameters for this selector |