types/selectors/FilenameSelector.php

Show: inherited
Table of Contents

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

Package: phing\types\selectors

Selector that filters files based on the filename.

Parent(s)
\BaseExtendSelector < \BaseSelector < \DataType < \ProjectComponent
Author
Hans Lellelid, hans@xmpl.org (Phing)  
Author
Bruce Atherton, bruce@callenish.com (Ant)  

Constants

Constant  NAME_KEY = "name"
Constant  CASE_KEY = "casesensitive"
Constant  NEGATE_KEY = "negate"

Properties

Propertyprivate  $casesensitive= 'true'
Default valuetrueDetails
Type
n/a
Propertyprivate  $negated= 'false'
Default valuefalseDetails
Type
n/a
Propertyprivate  $pattern= '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. Most of the work for this selector is offloaded into SelectorUtils, a static class that provides the same services for both FilenameSelector and DirectoryScanner.

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

is 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( \casesensitive $casesensitive ) : void

Whether to ignore case when checking filenames.

Parameters
Name Type Description
$casesensitive \casesensitive

whether to pay attention to case sensitivity

methodpublicsetDescription( ) : void

methodpublicsetError( ) : void

methodpublicsetName( \pattern $pattern ) : void

The name of the file, or the pattern for the name, that should be used for selection.

Parameters
Name Type Description
$pattern \pattern

the file pattern that any filename must match against in order to be selected.

methodpublicsetNegate( \negated $negated ) : void

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>.

Parameters
Name Type Description
$negated \negated

whether to negate this selection

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

methodpublictoString( ) : void

methodpublictooManyAttributes( ) : void

methodpublicvalidate( ) : void

methodpublicverifySettings( ) : void

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

Documentation was generated by DocBlox 0.17.1.