types/selectors/TypeSelector.php
Selector that selects a certain kind of file: directory or regular file.
- Author
- Hans Lellelid
(Phing) - Author
- Jeff Turner
(Ant) - Package
- phing.types.selectors
- Version
- $Revision: 526 $
\TypeSelector
Package: phing\types\selectors
Parameters
Selector that selects a certain kind of file: directory or regular file.
- Parent(s)
- \BaseExtendSelector < \BaseSelector < \DataType < \ProjectComponent
- Author
- Hans Lellelid
(Phing) - Author
- Jeff Turner
(Ant) - Version
- $Revision: 526 $
Constants
Properties
Methods

isSelected(
\PhingFile $basedir, string $filename, \PhingFile $file
)
:
booleanThe heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $basedir | \PhingFile | the base directory the scan is being done from |
| $filename | string | is the name of the file to check |
| $file | \PhingFile | is a PhingFile object the selector can use |
| Type | Description |
|---|---|
| boolean | Whether the file should be selected or not |

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 |

setType(
string $type
)
:
voidSet the type of file to require.
Parameters
| Name | Type | Description |
|---|---|---|
| $type | string | The type of file - 'file' or 'dir' |