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.
author |
Hans Lellelid hans@xmpl.org (Phing) |
---|---|
author |
Bruce Atherton bruce@callenish.com (Ant) |
version |
$Id: 5c41f7b883df0e79a8f16ade39e134084cd34f4c $ |
package |
phing.types.selectors |
__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 |
---|---|
getError() : string
string
the error condition
getParameters() : array
array
the set of parameters defined for this selector
getProject() : \Project
getSeconds()
isReference() : boolean
boolean
isSelected(\PhingFile $basedir, string $filename, \PhingFile $file) : boolean
string
is the name of the file to check
boolean
Whether the file should be selected or not
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}
setCheckdirs(boolean $includeDirs)
boolean
whether to check the timestamp on directories
setDatetime(string $dateTime)
string
a string in MM/DD/YYYY HH:MM AM_PM format
setDescription(string $desc) : void
string
setError(string $msg) : void
string
The error message any BuildException should throw.
setGranularity(integer $granularity)
integer
setParameters(array $parameters) : mixed|void
array
the complete set of parameters for this selector
mixed|void
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
setSeconds(integer $seconds)
integer
the time to compare file's last modified date to,
expressed in milliseconds
setWhen(string $cmp)
string
The comparison to perform
tooManyAttributes() : \BuildException
toString() : string
string
validate()
throws | |
---|---|
verifySettings()
MILLIS_KEY
DATETIME_KEY
CHECKDIRS_KEY
GRANULARITY_KEY
WHEN_KEY
seconds :
dateTime :
includeDirs :
granularity :
cmp :
timeComparisons :
parameters :
errmsg : string
var |
---|
string
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