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:

author | Hans Lellelid
version | $Id: 2eec26f6ebaaeceb4eca76644de88bde7515f5dc $
package | phing.tasks.system
copyright | 2001,2002 THYRELL. All rights reserved

### Methods

## Support for filesets; This method returns a reference to an instance of a FileSet object.

    createFileSet() : \FileSet

### Returns

`\FileSet`

## Property to pass to the new project.

    createProperty()

The property is passed as a 'user property'

access | public

## Reference element identifying a data type to carry over to the new project.

    createReference()

access | public

## Returns the textual description of the task

    getDescription() : string

Inherited

inherited_from | \Task::getDescription()

### Returns

`string`The text description of the task

## Returns the location within the buildfile this task occurs.

    getLocation() : \Location

Inherited

Used by BuildException to give detailed error messages.

inherited_from | \Task::getLocation()

### Returns

`\Location`The location object describing the position of this task within the buildfile.

## Returns the owning target of this task.

    getOwningTarget() : \Target

Inherited

inherited_from | \Task::getOwningTarget()

### Returns

`\Target`The target object that owns this task

## Returns a reference to current project

    getProject() : \Project

Inherited

inherited_from | \ProjectComponent::getProject()
inherited_from | \Task::getProject()

### Returns

`\Project`Reference to current porject object

## Returns the wrapper object for runtime configuration

    getRuntimeConfigurableWrapper() : \RuntimeConfigurable

Inherited

inherited_from | \Task::getRuntimeConfigurableWrapper()

### Returns

`\RuntimeConfigurable`The wrapper object used by this task

## Returns the name of task, used only for log messages

    getTaskName() : string

Inherited

inherited_from | \Task::getTaskName()

### Returns

`string`Name of this task

## Returns the name of the task under which it was invoked, usually the XML tagname

    getTaskType() : string

Inherited

inherited_from | \Task::getTaskType()

### Returns

`string`The type of this task (XML Tag)

## Creates a Project instance for the project to call.

    init() : void

Should throw a BuildException if something goes wrong with the build

This is abstract here, but may not be overloaded by subclasses.

### Exceptions

`\BuildException` |

## Provides a project level log event to the task.

    log(string $msg, integer $level)

Inherited

see | \global\BuildEvent
see | \global\BuildListener
inherited_from | \Task::log()

### Parameters

#### $msg

`string`

The message to log

#### $level

`integer`

The priority of the message

## Main entry point for the task.

    main() : void

This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running phing target1 target2 will run all tasks in target3 twice.

Should throw a BuildException if someting goes wrong with the build

This is abstract here. Must be overloaded by real tasks.

## Configure this task if it hasn't been done already.

    maybeConfigure()

Inherited

inherited_from | \Task::maybeConfigure()

## Perfrom this task

    perform()

Inherited

inherited_from | \Task::perform()

## Alias function for setPhingfile

    setBuildfile($s)

access | public

### Parameters

#### $s

## Sets a textual description of the task

    setDescription(string $desc)

Inherited

inherited_from | \Task::setDescription()

### Parameters

#### $desc

`string`

The text describing the task

## The directory to use as a base directory for the new phing project.

    setDir($d)

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.

access | public

### Parameters

#### $d

## If true, abort the build process if there is a problem with or in the target build file.

    setHaltOnFailure(boolean $hof)

Defaults to false.

### Parameters

#### $hof

`boolean`

new value

## If true, pass all properties to the new phing project.

    setInheritAll($value)

Defaults to true.

access | public

### Parameters

#### $value

## If true, pass all references to the new phing project.

    setInheritRefs($value)

Defaults to false.

access | public

### Parameters

#### $value

## Sets the location within the buildfile this task occurs.

    setLocation(\Location $location)

Inherited

Called by the parser to set location information.

inherited_from | \Task::setLocation()

### Parameters

#### $location

`\Location`

The location object describing the position of this task within the buildfile.

## Sets the owning target this task belongs to.

    setOwningTarget(\Target $target)

Inherited

inherited_from | \Task::setOwningTarget()

### Parameters

#### $target

`\Target`

Reference to owning target

## The build file to use.

    setPhingfile($s)

Defaults to "build.xml". This file is expected to be a filename relative to the dir attribute given.

access | public

### Parameters

#### $s

## References the project to the current component.

    setProject(\Project $project)

Inherited

inherited_from | \ProjectComponent::setProject()
inherited_from | \Task::setProject()

### Parameters

#### $project

`\Project`

The reference to the current project

## Sets the wrapper object this task should use for runtime configurable elements.

    setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)

Inherited

inherited_from | \Task::setRuntimeConfigurableWrapper()

### Parameters

#### $wrapper

`\RuntimeConfigurable`

The wrapper object this task should use

## The target of the new Phing project to execute.

    setTarget($s)

Defaults to the new project's default target.

access | public

### Parameters

#### $s

## Sets the name of this task for log messages

    setTaskName(string $name) : string

Inherited

inherited_from | \Task::setTaskName()

### Parameters

#### $name

`string`

### Returns

`string`A string representing the name of this task for log

## Sets the type of the task.

    setTaskType(string $name)

Inherited

Usually this is the name of the XML tag

inherited_from | \Task::setTaskType()

### Parameters

#### $name

`string`

The type of this task (XML Tag)

## Returns a name

    getRegisterSlot(string $slotName)

Inherited

inherited_from | \Task::getRegisterSlot()

### Parameters

#### $slotName

`string`

## Add the references explicitly defined as nested elements to the new project.

    addReferences() : void

Also copy over all references that don't override existing references in the new project if inheritrefs has been requested.

### Exceptions

`\BuildException` |

## Try to clone and reconfigure the object referenced by oldkey in the parent project and add it to the new project with the key newkey.

    copyReference(string $oldKey, string $newKey) : void

If we cannot clone it, copy the referenced object itself and keep our fingers crossed.

### Parameters

#### $oldKey

`string`

#### $newKey

`string`

## Configure the Project, i.e.

    initializeProject()

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

## Override the properties in the new project with the one explicitly defined as nested elements here.

    overrideProperties() : void

### Exceptions

`\BuildException` |

## Execute phing file.

    processFile() : void

## Called in execute or createProperty if newProject is null.

    reinit()

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.

### Properties

##

    $description : string

Inherited

inherited_from | \Task::$$description

##

    $location : \Location

Inherited

inherited_from | \Task::$$location

##

    $newTarget

##

    $project : \Project

Inherited

inherited_from | \ProjectComponent::$$project
inherited_from | \Task::$$project

##

    $target : \Target

Inherited

inherited_from | \Task::$$target

##

    $taskName : string

Inherited

inherited_from | \Task::$$taskName

##

    $taskType : string

Inherited

inherited_from | \Task::$$taskType

##

    $wrapper : \RuntimeConfigurable

Inherited

inherited_from | \Task::$$wrapper

##

    $dir

##

    $filesets

##

    $haltOnFailure

##

    $inheritAll

##

    $inheritRefs

##

    $newProject

##

    $phingFile

##

    $properties

##

    $references