A regular expression datatype. Keeps an instance of the compiled expression for speed purposes. This compiled expression is lazily evaluated (it is compiled the first time it is needed). The syntax is the dependent on which regular expression type you are using.
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)
author | |
---|---|
version |
$Id: 4b0da5e4e84cc48bb4e9c669c305448d3d59b11a $ |
see | |
package |
phing.types |
__construct()
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.
throws |
---|
\Project
getCheckedRef( $requiredClass, $dataTypeName) : mixed
throws |
---|
mixed
getDescription()
retujrn |
string |
---|---|
getIgnoreCase() : boolean
boolean
getModifiers() : string
string
getMultiline() : boolean
boolean
getPattern( $p) : string
throws |
---|
string
getProject() : \Project
isReference() : boolean
boolean
log(string $msg, integer $level = \Project::MSG_INFO) : void
string
The message to be logged.
integer
The message's priority at this message should have
noChildrenAllowed() : \BuildException
parsingComplete() : void
{@inheritdoc}
pushAndInvokeCircularReferenceCheck(\DataType $dt, &$stk, \Project $p)
setDescription(string $desc) : void
string
setIgnoreCase( $bit)
setModifiers( $modifiers)
setMultiline( $multiline)
setPattern( $pattern)
setProject(\Project $project) : void
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()
\Reference
setReplace( $replace)
tooManyAttributes() : \BuildException
regexp :
ignoreCase :
todo |
Probably both $ignoreCase and $multiline should be removed from attribute list of RegularExpression class: actual values are preserved on regexp engine level, not expression object itself. |
---|---|
multiline :
description : string
var |
---|
string
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).
var |
---|
boolean
project : \Project