phing-types-selectors
[ class tree: phing-types-selectors ] [ index: phing-types-selectors ] [ all elements ]

Class: FilenameSelector

Source Location: /types/selectors/FilenameSelector.php

Class Overview

ProjectComponent
   |
   --DataType
      |
      --BaseSelector
         |
         --BaseExtendSelector
            |
            --FilenameSelector

Selector that filters files based on the filename.


Author(s):

  • Bruce Atherton, bruce@callenish.com (Ant)
  • Hans Lellelid, hans@xmpl.org (Phing)

Version:

  • $Revision: 526 $

Constants

Methods


Inherited Variables

Inherited Methods

Class: BaseExtendSelector

BaseExtendSelector::getParameters()
Allows access to the parameters gathered and set within the <custom> tag.
BaseExtendSelector::setParameters()
Set all the Parameters for this custom selector, collected by the ExtendSelector class.

Class: BaseSelector

BaseSelector::getError()
Returns any error messages that have been set.
BaseSelector::setError()
Allows all selectors to indicate a setup error. Note that only the first error message is recorded.
BaseSelector::validate()
Subclasses can use this to throw the requisite exception in isSelected() in the case of an error condition.
BaseSelector::verifySettings()
<p>Subclasses can override this method to provide checking of their

Class: DataType

DataType::circularReference()
Creates an exception that indicates the user has generated a loop of data types referencing each other.
DataType::dieOnCircularReference()
Check to see whether any DataType we hold references to is included in the Stack (which holds all DataType instances that directly or indirectly reference this instance, including this instance itself).
DataType::getCheckedRef()
Performs the check for circular references and returns the referenced object.
DataType::getDescription()
Return the description for the current data type.
DataType::isReference()
Has the refid attribute of this element been set?
DataType::noChildrenAllowed()
Creates an exception that indicates that this XML element must not have child elements if the refid attribute is set.
DataType::parsingComplete()
Template method being called when the data type has been parsed completely.
DataType::setDescription()
Sets a description of the current data type. It will be useful in commenting what we are doing.
DataType::setRefid()
Set the value of the refid attribute.
DataType::tooManyAttributes()
Creates an exception that indicates that refid has to be the only attribute if it is set.

Class: ProjectComponent

ProjectComponent::getProject()
Returns a reference to current project
ProjectComponent::log()
Logs a message with the given priority.
ProjectComponent::setProject()
References the project to the current component.

Class Details

[line 33]
Selector that filters files based on the filename.



Tags:

author:  Bruce Atherton, bruce@callenish.com (Ant)
author:  Hans Lellelid, hans@xmpl.org (Phing)
version:  $Revision: 526 $


[ Top ]


Class Methods


method isSelected [line 150]

whether isSelected( $basedir, filename $filename, $file)

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.




Tags:

return:  the file should be selected or not
access:  public


Parameters:

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

[ Top ]

method setCasesensitive [line 83]

void setCasesensitive( casesensitive $casesensitive)

Whether to ignore case when checking filenames.



Tags:

access:  public


Parameters:

casesensitive   $casesensitive   whether to pay attention to case sensitivity

[ Top ]

method setName [line 68]

void setName( pattern $pattern)

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



Tags:

access:  public


Parameters:

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

[ Top ]

method setNegate [line 95]

void setNegate( negated $negated)

You can optionally reverse the selection of this selector, thereby emulating an &lt;exclude&gt; tag, by setting the attribute negate to true. This is identical to surrounding the selector with &lt;not&gt;&lt;/not&gt;.



Tags:

access:  public


Parameters:

negated   $negated   whether to negate this selection

[ Top ]

method setParameters [line 105]

void setParameters( array $parameters)

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

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




Tags:

access:  public


Overrides BaseExtendSelector::setParameters() (Set all the Parameters for this custom selector, collected by the ExtendSelector class.)

Parameters:

array   $parameters   the complete set of parameters for this selector

[ Top ]

method toString [line 42]

void toString( )



Tags:

access:  public


[ Top ]

method verifySettings [line 132]

void verifySettings( )

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



Tags:

access:  public


Overrides BaseSelector::verifySettings() (<p>Subclasses can override this method to provide checking of their)

[ Top ]


Class Constants

CASE_KEY =  "casesensitive"

[line 39]


[ Top ]

NAME_KEY =  "name"

[line 38]


[ Top ]

NEGATE_KEY =  "negate"

[line 40]


[ Top ]



Documentation generated on Mon, 19 Oct 2009 10:50:55 +0200 by phpDocumentor 1.4.3