# tasks/system/PhingTask.php

## \PhingReference
jump to top

Package: phing\tasks\system

Helper class that implements the nested <reference> element of <phing> and <phingcall>.

Parent(s)
  \Reference

### Properties

`$targetid= 'null'`
Default value `null` Details

Type
  n/a

### Methods

`__construct( ) : void`

`getRefId( ) : void`

`getReferencedObject( ) : void`

`getToRefid( ) : \the`

Get the id under which this reference will be stored in the new project

Returns

Type | Description
--- | ---
\the | id of the reference in the new project.

`setRefId( ) : void`

`setToRefid( \targetid $targetid ) : void`

Set the id that this reference to be stored under in the new project.

Parameters

Name | Type | Description
--- | --- | ---
$targetid | \targetid | the id under which this reference will be passed to the new project

## \PhingTask
jump to top

Package: phing\tasks\system

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

`$dir= ''`

the basedir where is executed the build file

Details

Type
  n/a

`$filesets= 'array()'`

The filesets that contain the files PhingTask is to be run on.

Default value `array()`Details

Type
  n/a

`$haltOnFailure= 'false'`

Fail the build process when the called build fails?

Default value `false` Details

Type
  n/a

`$inheritAll= 'true'`

should we inherit properties from the parent ?

Default value `true` Details

Type
  n/a

`$inheritRefs= 'false'`

should we inherit references from the parent ?

Default value `false` Details

Type
  n/a

`$newProject= ''`

the temporary project created to run the build file

Details

Type
  n/a

`$newTarget= ''`

the target to call if any

Details

Type
  n/a

`$phingFile= ''`

build.xml (can be absolute) in this case dir will be ignored

Details

Type
  n/a

`$properties= 'array()'`

the properties to pass to the new project

Default value `array()`Details

Type
  n/a

`$references= 'array()'`

the references to pass to the new project

Default value `array()`Details

Type
  n/a

### Methods

`addReferences( ) : void`

Add 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.

Throws

Exception | Description
--- | ---
\BuildException |

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

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.

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

Parameters

Name | Type | Description
--- | --- | ---
$oldKey | string |
$newKey | string |

`createFileSet( ) : \FileSet`

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

Returns

Type | Description
--- | ---
\FileSet |

`createProperty( ) : void`

Property to pass to the new project.

The property is passed as a 'user property'

Details

Access
  public

`createReference( ) : void`

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

Details

Access
  public

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

Creates a Project instance for the project to call.

`initializeProject( ) : void`

Configure 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".

Details

Access
  protected

`log( ) : void`

`main( ) : void`

Main entry point for the task.

`maybeConfigure( ) : void`

`overrideProperties( ) : void`

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

Throws

Exception | Description
--- | ---
\BuildException |

`perform( ) : void`

`processFile( ) : void`

Execute phing file.

`reinit( ) : void`

Called 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 ) : void`

Alias function for setPhingfile

Parameters

Name | Type | Description
--- | --- | ---
$s |  |

Details

Access
  public

`setDescription( ) : void`

`setDir( $d ) : void`

The 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.

Parameters

Name | Type | Description
--- | --- | ---
$d |  |

Details

Access
  public

`setHaltOnFailure( boolean $hof ) : void`

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

Defaults to false.

Parameters

Name | Type | Description
--- | --- | ---
$hof | boolean | new value

`setInheritAll( $value ) : void`

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

Defaults to true.

Parameters

Name | Type | Description
--- | --- | ---
$value |  |

Details

Access
  public

`setInheritRefs( $value ) : void`

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

Defaults to false.

Parameters

Name | Type | Description
--- | --- | ---
$value |  |

Details

Access
  public

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setPhingfile( $s ) : void`

The build file to use.

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

Parameters

Name | Type | Description
--- | --- | ---
$s |  |

Details

Access
  public

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTarget( $s ) : void`

The target of the new Phing project to execute.

Defaults to the new project's default target.

Parameters

Name | Type | Description
--- | --- | ---
$s |  |

Details

Access
  public

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.