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)
circularReference() : \BuildException
dieOnCircularReference( &$stk, \Project $p) : void
If one is included, throw a BuildException created by circularReference
This implementation is appropriate only for a DataType that cannot hold other DataTypes as children.
The general contract of this method is that it shouldn't do anything if checked is true and set it to true on exit.
getCheckedRef( $requiredClass, $dataTypeName) : mixed
getDescription() : string
the description of the current action, or
no description is available.
getError() : string
the error condition
getLocation() : \Location
the file/location where this task was defined.
Should not return
getProject() : \Project
Reference to current porject object
isReference() : boolean
log(string $msg, integer $level = \Project::MSG_INFO) : void
The message to be logged.
The message's priority at this message should have
noChildrenAllowed() : \BuildException
parsingComplete() : void
pushAndInvokeCircularReferenceCheck(\DataType $dt, &$stk, \Project $p)
Description of the current action.
null, indicating that no description is
setError(string $msg, \Exception $cause = null)
The error message any BuildException should throw.
The file/location where this task was defined.
Should not be
setProject(\Project $project) : void
The reference to the current project
setRefid(\Reference $r) : void
Subclasses may need to check whether any other attributes have been set as well or child elements have been created and thus override this method. if they do they must call parent::setRefid()
tooManyAttributes() : \BuildException
errmsg : string
cause : \Exception
ref : \Reference
checked : boolean
Subclasses are responsible for setting this value to false if we'd need to investigate this condition (usually because a child element has been added that is a subclass of DataType).
project : \Project
A reference to the current project instance
location : \Location
description : string