classes/phing/types/selectors/FilenameSelector.php
Selector that filters files based on the filename.
- author
- Hans Lellelid, hans@xmpl.org (Phing)
- author
- Bruce Atherton, bruce@callenish.com (Ant)
- package
- phing.types.selectors
\FilenameSelector
Selector that filters files based on the filename.
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.
- Extends from
- \BaseExtendSelector
- author
- Hans Lellelid, hans@xmpl.org (Phing)
- author
- Bruce Atherton, bruce@callenish.com (Ant)
- package
- phing.types.selectors
- version
- $Revision: 526 $
Constants
Properties
Methods

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. Most of the work
for this selector is offloaded into SelectorUtils, a static class
that provides the same services for both FilenameSelector and
DirectoryScanner.
| 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 | is a PhingFile object the selector can use |
| Type | Description |
|---|---|
| \whether |

setCasesensitive(
\casesensitive $casesensitive
)
:
Whether to ignore case when checking filenames.
| Name | Type | Description |
|---|---|---|
| $casesensitive | \casesensitive | whether to pay attention to case sensitivity |

setName(
\pattern $pattern
)
:
The name of the file, or the pattern for the name, that
should be used for selection.
| Name | Type | Description |
|---|---|---|
| $pattern | \pattern | the file pattern that any filename must match against in order to be selected. |

setNegate(
\negated $negated
)
:
You can optionally reverse the selection of this selector,
thereby emulating an <exclude> tag, by setting the attribute
negate to true. This is identical to surrounding the selector
with <not></not>.
| Name | Type | Description |
|---|---|---|
| $negated | \negated | whether to negate this selection |

setParameters(
array $parameters
)
:
When 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 |