classes/phing/types/selectors/DependSelector.php

Selector that filters files based on whether they are newer than a matching file in another directory tree. It can contain a mapper element, so isn't available as an ExtendSelector (since those parameters can't hold other elements).

author
Hans Lellelid (Phing)
author
Bruce Atherton (Ant)
package
phing.types.selectors
version
$Revision: 526 $

\DependSelector

Selector that filters files based on whether they are newer than a matching file in another directory tree. It can contain a mapper element, so isn't available as an ExtendSelector (since those parameters can't hold other elements).

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)

Extends from
\BaseSelector
author
Hans Lellelid (Phing)
author
Bruce Atherton (Ant)
package
phing.types.selectors
version
$Revision: 526 $

Properties

Propertyprivate  $granularity= '0'
Default value0Details
Type
Propertyprivate  $map= 'null'
Default valuenullDetails
Type
Propertyprivate  $mapperElement= 'null'
Default valuenullDetails
Type
Propertyprivate  $targetdir= 'null'
Default valuenullDetails
Type

Methods

methodpublic  __construct( ) :
methodpublic  createMapper( ) :
Defines the FileNameMapper to use (nested mapper element).
Details
throws
methodpublic  isSelected( \basedir $basedir, \filename $filename, \file $file ) : \whether
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 \basedir the base directory the scan is being done from
$filename \filename is the name of the file to check
$file \file is a PhingFile object the selector can use
Returns
Type Description
\whether
methodpublic  setGranularity(  $granularity ) :
Sets the number of milliseconds leeway we will give before we consider a file out of date.
Parameters
Name Type Description
$granularity
methodpublic  setTargetdir( \targetdir $targetdir ) :
The name of the file or directory which is checked for out-of-date files.
Parameters
Name Type Description
$targetdir \targetdir the directory to scan looking for files.
methodpublic  toString( ) :
methodpublic  verifySettings( ) :
Checks to make sure all settings are kosher. In this case, it means that the dest attribute has been set and we have a mapper.
Documentation was generated by DocBlox 0.13.1.