PHP Class CopyTask, symfony-1.4

Author: Andreas Aderhold, [email protected]
Inheritance: extends Task
Afficher le fichier Open project: vjousse/symfony-1.4 Class Usage Examples

Protected Properties

Свойство Type Description
$completeDirMap asoc array containing mapped file names
$destDir the destiantion file (from xml attribute)
$destFile the source file (from xml attribute)
$dirCopyMap asoc array containing mapped file names
$file
$fileCopyMap
$fileUtils asoc array containing complete dir names
$filesets a instance of fileutils
$filterChains all fileset objects assigned to this task
$flatten include empty dirs? (from XML)
$includeEmpty sync timestamps (from xml attribute)
$mapperElement apply the FlattenMapper right way (from XML)
$overwrite the destination dir (from xml attribute)
$preserveLMT overwrite destination (from xml attribute)
$verbosity all filterchains objects assigned to this task

Méthodes publiques

Méthode Description
__construct ( ) : object Sets up this object internal stuff. i.e. the Fileutils instance
createFileSet ( ) : object Nested creator, creates a FileSet for this task
createFilterChain ( ) : object Creates a filterchain
createMapper ( ) : object Nested creator, creates one Mapper for this task
main ( ) : true The main entry point where everything gets in motion.
setFile ( PhingFile $file ) : void Set the file. We have to manually take care of the type that is coming due to limited type support in php in and convert it manually if neccessary.
setIncludeEmptyDirs ( $bool ) : void Set the include empty dirs flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
setOverwrite ( $bool ) : void Set the overwrite flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
setTodir ( PhingFile $dir ) : void Set the toDir. We have to manually take care of the type that is coming due to limited type support in php in and convert it manually if neccessary.
setTofile ( PhingFile $file ) : void Set the toFile. We have to manually take care of the type that is coming due to limited type support in php in and convert it manually if neccessary.
setTstamp ( $bool ) : void Set the preserve timestmap flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
setVerbose ( boolean $verbosity ) Used to force listing of all names of copied files.

Méthodes protégées

Méthode Description
doWork ( ) : void Actually copies the files
validateAttributes ( ) : void Validates attributes coming in from XML

Private Methods

Méthode Description
_scan ( &$fromDir, &$toDir, &$files, &$dirs ) : void Compares source files to destination files to see if they should be copied.
buildMap ( &$fromDir, &$toDir, &$names, &$mapper, &$map ) : void Builds a map of filenames (from->to) that should be copied

Method Details

__construct() public méthode

Sets up this object internal stuff. i.e. the Fileutils instance
public __construct ( ) : object
Résultat object The CopyTask instnace

createFileSet() public méthode

Nested creator, creates a FileSet for this task
public createFileSet ( ) : object
Résultat object The created fileset object

createFilterChain() public méthode

Creates a filterchain
public createFilterChain ( ) : object
Résultat object The created filterchain object

createMapper() public méthode

Nested creator, creates one Mapper for this task
public createMapper ( ) : object
Résultat object The created Mapper type object

doWork() protected méthode

Actually copies the files
protected doWork ( ) : void
Résultat void

main() public méthode

The main entry point where everything gets in motion.
public main ( ) : true
Résultat true on success

setFile() public méthode

Set the file. We have to manually take care of the type that is coming due to limited type support in php in and convert it manually if neccessary.
public setFile ( PhingFile $file ) : void
$file PhingFile
Résultat void

setIncludeEmptyDirs() public méthode

Set the include empty dirs flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
public setIncludeEmptyDirs ( $bool ) : void
Résultat void

setOverwrite() public méthode

Set the overwrite flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
public setOverwrite ( $bool ) : void
Résultat void

setTodir() public méthode

Set the toDir. We have to manually take care of the type that is coming due to limited type support in php in and convert it manually if neccessary.
public setTodir ( PhingFile $dir ) : void
$dir PhingFile
Résultat void

setTofile() public méthode

Set the toFile. We have to manually take care of the type that is coming due to limited type support in php in and convert it manually if neccessary.
public setTofile ( PhingFile $file ) : void
$file PhingFile
Résultat void

setTstamp() public méthode

Set the preserve timestmap flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
public setTstamp ( $bool ) : void
Résultat void

setVerbose() public méthode

Used to force listing of all names of copied files.
public setVerbose ( boolean $verbosity )
$verbosity boolean

validateAttributes() protected méthode

Validates attributes coming in from XML
protected validateAttributes ( ) : void
Résultat void

Property Details

$completeDirMap protected_oe property

asoc array containing mapped file names
protected $completeDirMap

$destDir protected_oe property

the destiantion file (from xml attribute)
protected $destDir

$destFile protected_oe property

the source file (from xml attribute)
protected $destFile

$dirCopyMap protected_oe property

asoc array containing mapped file names
protected $dirCopyMap

$file protected_oe property

protected $file

$fileCopyMap protected_oe property

protected $fileCopyMap

$fileUtils protected_oe property

asoc array containing complete dir names
protected $fileUtils

$filesets protected_oe property

a instance of fileutils
protected $filesets

$filterChains protected_oe property

all fileset objects assigned to this task
protected $filterChains

$flatten protected_oe property

include empty dirs? (from XML)
protected $flatten

$includeEmpty protected_oe property

sync timestamps (from xml attribute)
protected $includeEmpty

$mapperElement protected_oe property

apply the FlattenMapper right way (from XML)
protected $mapperElement

$overwrite protected_oe property

the destination dir (from xml attribute)
protected $overwrite

$preserveLMT protected_oe property

overwrite destination (from xml attribute)
protected $preserveLMT

$verbosity protected_oe property

all filterchains objects assigned to this task
protected $verbosity