### Classes, interfaces and traits

# ExtendFileSelector¶

This is the interface to be used by all custom selectors, those that are called through the &lt;custom&gt; tag. It is the amalgamation of two interfaces, the FileSelector and the Paramterizable interface. Note that you will almost certainly want the default behaviour for handling Parameters, so you probably want to use the BaseExtendSelector class as the base class for your custom selector rather than implementing this interface from scratch.

« More »

# FileSelector¶

This is the interface to be used by all selectors.

« More »

# SelectorContainer¶

This is the interface for selectors that can contain other selectors.

« More »

# SelectorScanner¶

An interface used to describe the actions required by any type of directory scanner that supports Selecters.

« More »

# AndSelector¶

This selector has a collection of other selectors, all of which have to select a file in order for this selector to select it.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# BaseExtendSelector¶

Convenience base class for all selectors accessed through ExtendSelector.

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.
« More »

# BaseSelector¶

A convenience base class that you can subclass Selectors from. It provides some helpful common behaviour. Note that there is no need for Selectors to inherit from this class, it is only necessary that they implement FileSelector.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# BaseSelectorContainer¶

This is the base class for selectors that can contain other selectors.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# 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.
« More »

# ContainsSelector¶

Selector that filters files based on whether they contain a particular string.

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.
« More »

# DateSelector¶

Selector that chooses files based on their last modified date. Ant uses millisecond precision (thanks to Java); PHP is forced to use only seconds precision.

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.
« More »

# DependSelector¶

Selector that filters files based on whether they are newer than a matching file in another directory tree. It can contain a mapper element, so isn't available as an ExtendSelector (since those parameters can't hold other elements).

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# DepthSelector¶

Selector that filters files based on the how deep in the directory tree they are.

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.
« More »

# ExtendSelector¶

Selector that selects files by forwarding the request on to other classes.

TODO - Consider adding Path (phing.types.Path) support to this class and to the Mappers class. See Ant versions for implimentation details.
« More »

# 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.
« More »

# MajoritySelector¶

This selector is here just to shake up your thinking a bit. Don't get too caught up in boolean, there are other ways you can evaluate a collection of selectors. This one takes a vote of the selectors it contains, and majority wins. You could also have an "all-but-one" selector, a "weighted-average" selector, and so on. These are left as exercises for the reader (as are the usecases where this would be necessary).

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# NoneSelector¶

This selector has a collection of other selectors. All of those selectors must refuse to select a file before the file is considered selected by this selector.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# NotSelector¶

This selector has one other selectors whose meaning it inverts. It actually relies on NoneSelector for its implementation of the isSelected() method, but it adds a check to ensure there is only one other selector contained within.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# OrSelector¶

This selector has a collection of other selectors, any of which have to select a file in order for this selector to select it.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# PresentSelector¶

Selector that filters files based on whether they appear in another directory tree. It can contain a mapper element, so isn't available as an ExtendSelector (since those parameters can't hold other elements).

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# SelectorUtils¶

<p>This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any subclasses of DirectoryScanner that may access these methods.

</p> <p>This is a Singleton.</p>
« More »

# SelectSelector¶

This selector just holds one other selector and forwards all requests to it. It exists so that there is a single selector type that can exist outside of any targets, as an element of project. It overrides all of the reference stuff so that it works as expected. Note that this is the only selector you can reference.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# SizeSelector¶

Selector that filters files based on their size.

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.
« More »

# TypeSelector¶

Selector that selects a certain kind of file: directory or regular file.

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.
« More »