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: f05cee91082616c66b2e109157b1d2f2298a66f8 $ |
| package |
phing.types.selectors |
__construct()
toString()
setSeconds(int $seconds)
intthe time to compare file's last modified date to, expressed in milliseconds
getSeconds()
setDatetime(string $dateTime)
stringa string in MM/DD/YYYY HH:MM AM_PM format
setCheckdirs(boolean $includeDirs)
booleanwhether to check the timestamp on directories
setGranularity(int $granularity)
int
setWhen(string $cmp)
stringThe comparison to perform
setParameters($parameters)
verifySettings()
isSelected(\PhingFile $basedir, string $filename, \PhingFile $file) : boolean
stringis the name of the file to check
booleanWhether the file should be selected or not
getParameters() : \the
\theset of parameters defined for this selector
setError($msg)
getError() : \the
\theerror condition
validate()
setDescription($desc)
getDescription()
isReference()
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()
dieOnCircularReference($stk, \Project $p)
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)
tooManyAttributes()
noChildrenAllowed()
circularReference()
parsingComplete() : void
setProject(\Project $project)
getProject() : \Project
log(string $msg, integer $level = \Project::MSG_INFO)
stringThe message to be logged.
integerThe message's priority at this message should have
MILLIS_KEY
DATETIME_KEY
CHECKDIRS_KEY
GRANULARITY_KEY
WHEN_KEY
seconds :
dateTime :
includeDirs :
granularity :
cmp :
timeComparisons :
parameters :
errmsg :
description :
ref :
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