tasks/system/PhingTask.php
\PhingReference
Helper class that implements the nested <reference> element of <phing> and <phingcall>.
- Parent(s)
- \Reference
Properties
Methods
\PhingTask
Task that invokes phing on another build file.
Use this task, for example, if you have nested buildfiles in your project. Unlike AntTask, PhingTask can even support filesets:
- Parent(s)
- \Task < \ProjectComponent
- Author
- Hans Lellelid
- Version
- $Revision: 1382 $
Properties

$filesets= 'array()'
The filesets that contain the files PhingTask is to be run on.
array()Details- Type
- n/a

$haltOnFailure= 'false'
Fail the build process when the called build fails?
falseDetails- Type
- n/a

$inheritAll= 'true'
should we inherit properties from the parent ?
trueDetails- Type
- n/a

$inheritRefs= 'false'
should we inherit references from the parent ?
falseDetails- Type
- n/a

$properties= 'array()'
the properties to pass to the new project
array()Details- Type
- n/a
Methods

addReferences(
)
:
voidAdd the references explicitly defined as nested elements to the new project. Also copy over all references that don't override existing references in the new project if inheritrefs has been requested.
| Exception | Description |
|---|---|
| \BuildException |

copyReference(
string $oldKey, string $newKey
)
:
voidTry to clone and reconfigure the object referenced by oldkey in the parent project and add it to the new project with the key newkey.
If we cannot clone it, copy the referenced object itself and keep our fingers crossed.
| Name | Type | Description |
|---|---|---|
| $oldKey | string | |
| $newKey | string |

createFileSet(
)
:
\FileSetSupport for filesets; This method returns a reference to an instance of a FileSet object.
| Type | Description |
|---|---|
| \FileSet |

createProperty(
)
:
voidProperty to pass to the new project.
The property is passed as a 'user property'
- Access
- public

createReference(
)
:
voidReference element identifying a data type to carry over to the new project.
- Access
- public

initializeProject(
)
:
voidConfigure the Project, i.e. make intance, attach build listeners (copy from father project), add Task and Datatype definitions, copy properties and references from old project if these options are set via the attributes of the XML tag.
Developer note: This function replaces the old methods "init", "_reinit" and "_initializeProject".
- Access
- protected

overrideProperties(
)
:
voidOverride the properties in the new project with the one explicitly defined as nested elements here.
| Exception | Description |
|---|---|
| \BuildException |

reinit(
)
:
voidCalled in execute or createProperty if newProject is null.
This can happen if the same instance of this task is run twice as newProject is set to null at the end of execute (to save memory and help the GC).
Sets all properties that have been defined as nested property elements.

setBuildfile(
$s
)
:
voidAlias function for setPhingfile
| Name | Type | Description |
|---|---|---|
| $s |
- Access
- public

setDir(
$d
)
:
voidThe directory to use as a base directory for the new phing project.
Defaults to the current project's basedir, unless inheritall has been set to false, in which case it doesn't have a default value. This will override the basedir setting of the called project.
| Name | Type | Description |
|---|---|---|
| $d |
- Access
- public

setHaltOnFailure(
boolean $hof
)
:
voidIf true, abort the build process if there is a problem with or in the target build file.
Defaults to false.
| Name | Type | Description |
|---|---|---|
| $hof | boolean | new value |

setInheritAll(
$value
)
:
voidIf true, pass all properties to the new phing project.
Defaults to true.
| Name | Type | Description |
|---|---|---|
| $value |
- Access
- public

setInheritRefs(
$value
)
:
voidIf true, pass all references to the new phing project.
Defaults to false.
| Name | Type | Description |
|---|---|---|
| $value |
- Access
- public

setPhingfile(
$s
)
:
voidThe build file to use.
Defaults to "build.xml". This file is expected to be a filename relative to the dir attribute given.
| Name | Type | Description |
|---|---|---|
| $s |
- Access
- public

setTarget(
$s
)
:
voidThe target of the new Phing project to execute.
Defaults to the new project's default target.
| Name | Type | Description |
|---|---|---|
| $s |
- Access
- public