tasks/system/XsltTask.php
\XsltTask
Implements an XSLT processing filter while copying files.
This is a shortcut for calling the
- Parent(s)
- \CopyTask < \Task < \ProjectComponent
- Author
- Andreas Aderhold, andi@binarycloud.com
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Version
- $Id: XsltTask.php 526 2009-08-11 12:11:17Z mrook $
Properties

$completeDirMap= 'array()'
array()Details- Type
- Inherited_from
- \CopyTask::$completeDirMap

string
$description= ''
- Type
- string
- Inherited_from
- \Task::$description

$destDir= 'null'
nullDetails- Type
- Inherited_from
- \CopyTask::$destDir

$destFile= 'null'
nullDetails- Type
- Inherited_from
- \CopyTask::$destFile

$dirCopyMap= 'array()'
array()Details- Type
- Inherited_from
- \CopyTask::$dirCopyMap

$file= 'null'
nullDetails- Type
- Inherited_from
- \CopyTask::$file

$fileCopyMap= 'array()'
array()Details- Type
- Inherited_from
- \CopyTask::$fileCopyMap

$fileUtils= 'null'
nullDetails- Type
- Inherited_from
- \CopyTask::$fileUtils

$filelists= 'array()'
array()Details- Type
- Inherited_from
- \CopyTask::$filelists

$filesets= 'array()'
array()Details- Type
- Inherited_from
- \CopyTask::$filesets

$filterChains= 'array()'
array()Details- Type
- Inherited_from
- \CopyTask::$filterChains

$flatten= 'false'
falseDetails- Type
- Inherited_from
- \CopyTask::$flatten

$haltonerror= 'true'
trueDetails- Type
- Inherited_from
- \CopyTask::$haltonerror

$includeEmpty= 'true'
trueDetails- Type
- Inherited_from
- \CopyTask::$includeEmpty

\Location
$location= ''
- Type
- \Location
- Inherited_from
- \Task::$location

$mapperElement= 'null'
nullDetails- Type
- Inherited_from
- \CopyTask::$mapperElement

$mode= '0755'
0755Details- Type
- Inherited_from
- \CopyTask::$mode

$overwrite= 'false'
falseDetails- Type
- Inherited_from
- \CopyTask::$overwrite

$preserveLMT= 'false'
falseDetails- Type
- Inherited_from
- \CopyTask::$preserveLMT

\Project
$project= 'null'
Holds a reference to the project that a project component (a task, a target, etc.) belongs to
A reference to the current project instanceInherited from: \ProjectComponent::$project
\Target
$target= ''
- Type
- \Target
- Inherited_from
- \Task::$target

string
$taskName= ''
- Type
- string
- Inherited_from
- \Task::$taskName

string
$taskType= ''
- Type
- string
- Inherited_from
- \Task::$taskType

$verbosity= 'Project::MSG_VERBOSE'
Project::MSG_VERBOSEDetails- Type
- Inherited_from
- \CopyTask::$verbosity

\RuntimeConfigurable
$wrapper= ''
- Type
- \RuntimeConfigurable
- Inherited_from
- \Task::$wrapper
Methods

__construct(
)
:
objectSets up this object internal stuff. i.e. the Fileutils instance
Inherited from: \CopyTask::__construct()| Type | Description |
|---|---|
| object | The CopyTask instnace |
- Access
- public

createFileList(
)
:
objectNested creator, adds a set of files (nested fileset attribute).
Inherited from: \CopyTask::createFileList()| Type | Description |
|---|---|
| object | The created filelist object |
- Access
- public

createFileSet(
)
:
object
| Type | Description |
|---|---|
| object | The created fileset object |
- Access
- public

createFilterChain(
)
:
object
| Type | Description |
|---|---|
| object | The created filterchain object |
- Access
- public

createMapper(
)
:
object
| Type | Description |
|---|---|
| object | The created Mapper type object |
| Exception | Description |
|---|---|
| \BuildException |
- Access
- public

createParam(
)
:
\XSLTParamSupport nested tags useing XSLTParam class.
| Type | Description |
|---|---|
| \XSLTParam |

getLocation(
)
:
\LocationReturns the location within the buildfile this task occurs. Used by {@link BuildException} to give detailed error messages.
Inherited from: \Task::getLocation()| Type | Description |
|---|---|
| \Location | The location object describing the position of this task within the buildfile. |

getRuntimeConfigurableWrapper(
)
:
\RuntimeConfigurableReturns the wrapper object for runtime configuration
Inherited from: \Task::getRuntimeConfigurableWrapper()| Type | Description |
|---|---|
| \RuntimeConfigurable | The wrapper object used by this task |

getTaskType(
)
:
stringReturns the name of the task under which it was invoked, usually the XML tagname
Inherited from: \Task::getTaskType()| Type | Description |
|---|---|
| string | The type of this task (XML Tag) |

init(
)
:
voidSetup the filterchains w/ XSLTFilter that we will use while copying the files.
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
| Exception | Description |
|---|---|
| \BuildException |

log(
string $msg, integer $level
=
Project::MSG_INFO
)
:
void
@param string $msg The message to be logged.
| Name | Type | Description |
|---|---|---|
| $msg | string | The message to log |
| $level | integer | The priority of the message |
- See
- \BuildEvent
- See
- \BuildListener

logError(
$message, $location
=
NULL
)
:
void| Name | Type | Description |
|---|---|---|
| $message | ||
| $location |

main(
)
:
trueSet any XSLT Param and invoke CopyTask::main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
| Type | Description |
|---|---|
| true | on success |
| Exception | Description |
|---|---|
| \BuildException |

maybeConfigure(
)
:
voidConfigure this task if it hasn't been done already.
Inherited from: \Task::maybeConfigure()
setDescription(
string $desc
)
:
void
| Name | Type | Description |
|---|---|---|
| $desc | string | The text describing the task |

setFile(
\string/object $file
)
:
voidSet 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.
Inherited from: \CopyTask::setFile()| Name | Type | Description |
|---|---|---|
| $file | \string/object | The source file. Either a string or an PhingFile object |
- Access
- public

setHaltonerror(
boolean $haltonerror
)
:
voidSet the haltonerror attribute - when true, will make the build fail when errors are detected.
Inherited from: \CopyTask::setHaltonerror()| Name | Type | Description |
|---|---|---|
| $haltonerror | boolean | Flag if the build should be stopped on errors |
- Access
- public

setIncludeEmptyDirs(
boolean $bool
)
:
voidSet 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.
Inherited from: \CopyTask::setIncludeEmptyDirs()| Name | Type | Description |
|---|---|---|
| $bool | boolean | Flag if empty dirs should be cpoied too |
- Access
- public

setLocation(
\Location $location
)
:
voidSets the location within the buildfile this task occurs. Called by the parser to set location information.
Inherited from: \Task::setLocation()| Name | Type | Description |
|---|---|---|
| $location | \Location | The location object describing the position of this task within the buildfile. |

setMode(
integer $mode
)
:
voidSets the mode to create destination directories with (ignored on Windows).
Inherited from: \CopyTask::setMode()Default mode is 0755.
| Name | Type | Description |
|---|---|---|
| $mode | integer | Octal mode |
- Access
- public

setOverwrite(
boolean $bool
)
:
voidSet 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.
Inherited from: \CopyTask::setOverwrite()| Name | Type | Description |
|---|---|---|
| $bool | boolean | Overwrite the destination file(s) if it/they already exist |
- Access
- public

setOwningTarget(
\Target $target
)
:
void
| Name | Type | Description |
|---|---|---|
| $target | \Target | Reference to owning target |

setPreserveLastModified(
boolean $bool
)
:
voidSet the preserve timestamp flag. IntrospectionHelper takes care of booleans in set* methods so we can assume that the right value (boolean primitive) is coming in here.
Inherited from: \CopyTask::setPreserveLastModified()| Name | Type | Description |
|---|---|---|
| $bool | boolean | Preserve the timestamp on the destination file |
- Access
- public

setProject(
\Project $project
)
:
voidReferences the project to the current component.
Inherited from: \ProjectComponent::setProject()| Name | Type | Description |
|---|---|---|
| $project | \Project | The reference to the current project |

setResolveDocumentExternals(
bool $resolveExternals
)
:
voidWhether to resolve entities in the XML document.
| Name | Type | Description |
|---|---|---|
| $resolveExternals | bool |
- Since
- 2.4

setResolveStylesheetExternals(
bool $resolveExternals
)
:
voidWhether to resolve entities in the stylesheet.
| Name | Type | Description |
|---|---|---|
| $resolveExternals | bool |
- Since
- 2.4

setRuntimeConfigurableWrapper(
\RuntimeConfigurable $wrapper
)
:
voidSets the wrapper object this task should use for runtime configurable elements.
Inherited from: \Task::setRuntimeConfigurableWrapper()| Name | Type | Description |
|---|---|---|
| $wrapper | \RuntimeConfigurable | The wrapper object this task should use |

setStyle(
\PhingFile $style
)
:
voidSet the stylesheet to use.
| Name | Type | Description |
|---|---|---|
| $style | \PhingFile |

setTaskName(
$name
)
:
string
| Name | Type | Description |
|---|---|---|
| $name |
| Type | Description |
|---|---|
| string | A string representing the name of this task for log |

setTaskType(
string $name
)
:
voidSets the type of the task. Usually this is the name of the XML tag
Inherited from: \Task::setTaskType()| Name | Type | Description |
|---|---|---|
| $name | string | The type of this task (XML Tag) |

setTodir(
\string/object $dir
)
:
voidSet 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.
Inherited from: \CopyTask::setTodir()| Name | Type | Description |
|---|---|---|
| $dir | \string/object | The directory, either a string or an PhingFile object |
- Access
- public

setTofile(
\string/object $file
)
:
voidSet 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.
Inherited from: \CopyTask::setTofile()| Name | Type | Description |
|---|---|---|
| $file | \string/object | The dest file. Either a string or an PhingFile object |
- Access
- public

setVerbose(
boolean $verbosity
)
:
voidUsed to force listing of all names of copied files.
Inherited from: \CopyTask::setVerbose()| Name | Type | Description |
|---|---|---|
| $verbosity | boolean |