types/selectors/DateSelector.php

Show: inherited
Table of Contents

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.

Author
Hans Lellelid (Phing)  
Author
Bruce Atherton (Ant)  
Package
phing.types.selectors  
Version
$Revision: 1207 $  

\DateSelector

Package: phing\types\selectors

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.

Parent(s)
\BaseExtendSelector < \BaseSelector < \DataType < \ProjectComponent
Author
Hans Lellelid (Phing)  
Author
Bruce Atherton (Ant)  
Version
$Revision: 1207 $  

Constants

Constant  MILLIS_KEY = "millis"
Constant  DATETIME_KEY = "datetime"
Constant  CHECKDIRS_KEY = "checkdirs"
Constant  GRANULARITY_KEY = "granularity"
Constant  WHEN_KEY = "when"

Properties

Propertyprivate  $cmp= '2'
Default value2Details
Type
n/a
Propertyprivate  $dateTime= 'null'
Default valuenullDetails
Type
n/a
Propertyprivate  $granularity= '0'
Default value0Details
Type
n/a
Propertyprivate  $includeDirs= 'false'
Default valuefalseDetails
Type
n/a
Propertyprivate  $seconds= '-1'
Default value-1Details
Type
n/a
Propertyprivate  $timeComparisons= 'array("before"'
static
Default valuearray("before"Details
Type
n/a

Methods

methodpublic__construct( ) : void

methodpubliccircularReference( ) : void

methodpublicdieOnCircularReference( ) : void

methodpublicgetCheckedRef( ) : void

methodpublicgetDescription( ) : void

methodpublicgetError( ) : void

methodprotectedgetParameters( ) : void

methodpublicgetProject( ) : void

methodpublicgetSeconds( ) : void

Returns the seconds value the selector is set for.

methodpublicisReference( ) : void

methodpublicisSelected( \PhingFile $basedir, string $filename, \PhingFile $file ) : boolean

The heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset.

Parameters
Name Type Description
$basedir \PhingFile

the base directory the scan is being done from

$filename string

is the name of the file to check

$file \PhingFile

is a PhingFile object the selector can use

Returns
Type Description
boolean Whether the file should be selected or not
methodpubliclog( ) : void

methodpublicnoChildrenAllowed( ) : void

methodpublicparsingComplete( ) : void

methodpublicsetCheckdirs( boolean $includeDirs ) : void

Should we be checking dates on directories?

Parameters
Name Type Description
$includeDirs boolean

whether to check the timestamp on directories

methodpublicsetDatetime( string $dateTime ) : void

Sets the date. The user must supply it in MM/DD/YYYY HH:MM AM_PM format

Parameters
Name Type Description
$dateTime string

a string in MM/DD/YYYY HH:MM AM_PM format

methodpublicsetDescription( ) : void

methodpublicsetError( ) : void

methodpublicsetGranularity( int $granularity ) : void

Sets the number of milliseconds leeway we will give before we consider a file not to have matched a date.

Parameters
Name Type Description
$granularity int
methodpublicsetParameters( array $parameters ) : void

When using this as a custom selector, this method will be called.

It translates each parameter into the appropriate setXXX() call.

Parameters
Name Type Description
$parameters array

the complete set of parameters for this selector

methodpublicsetProject( ) : void

methodpublicsetRefid( ) : void

methodpublicsetSeconds( int $seconds ) : void

For users that prefer to express time in seconds since 1970

Parameters
Name Type Description
$seconds int

the time to compare file's last modified date to, expressed in milliseconds

methodpublicsetWhen( string $cmp ) : void

Sets the type of comparison to be done on the file's last modified date.

Parameters
Name Type Description
$cmp string

The comparison to perform

methodpublictoString( ) : void

methodpublictooManyAttributes( ) : void

methodpublicvalidate( ) : void

methodpublicverifySettings( ) : void

This is a consistency check to ensure the selector's required values have been set.

Documentation was generated by DocBlox 0.17.1.