classes/phing/tasks/system/PhingTask.php

\PhingReference

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

Extends from
\Reference
package
phing.tasks.system

Properties

Propertyprivate  $targetid= 'null'
Default valuenullDetails
Type

Methods

methodpublic  getToRefid( ) : \the
Get the id under which this reference will be stored in the new project
Returns
Type Description
\the
methodpublic  setToRefid( \targetid $targetid ) :
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

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:

  
   
      
     
   
  
Extends from
\Task
author
Hans Lellelid
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.system
version
$Revision: 1014 $

Properties

Propertyprivate  $dir= ''

the basedir where is executed the build file

Details
Type
Propertyprivate  $filesets= 'array'

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

Default valuearrayDetails
Type
Propertyprivate  $haltOnFailure= 'false'

Fail the build process when the called build fails?

Default valuefalseDetails
Type
Propertyprivate  $inheritAll= 'true'

should we inherit properties from the parent ?

Default valuetrueDetails
Type
Propertyprivate  $inheritRefs= 'false'

should we inherit references from the parent ?

Default valuefalseDetails
Type
Propertyprivate  $newProject= ''

the temporary project created to run the build file

Details
Type
Propertyprotected  $newTarget= ''

the target to call if any

Details
Type
Propertyprivate  $phingFile= ''

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

Details
Type
Propertyprivate  $properties= 'array'

the properties to pass to the new project

Default valuearrayDetails
Type
Propertyprivate  $references= 'array'

the references to pass to the new project

Default valuearrayDetails
Type

Methods

methodprivate  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.
Details
throws
methodprivate  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
methodpublic  createFileSet( ) : \FileSet
Support for filesets; This method returns a reference to an instance of a FileSet object.
Returns
Type Description
\FileSet
methodpublic  createProperty( ) :
Property to pass to the new project.

The property is passed as a 'user property'

Details
access
public
methodpublic  createReference( ) :
Reference element identifying a data type to carry over to the new project.
Details
access
public
methodpublic  init( ) : void
Creates a Project instance for the project to call.
methodprivate  initializeProject( ) :
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
methodpublic  main( ) : void
Main entry point for the task.
methodprivate  overrideProperties( ) : void
Override the properties in the new project with the one explicitly defined as nested elements here.
Details
throws
methodprivate  processFile( ) : void
Execute phing file.
methodprivate  reinit( ) :
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.

methodpublic  setBuildfile(  $s ) :
Alias function for setPhingfile
Parameters
Name Type Description
$s
Details
access
public
methodpublic  setDir(  $d ) :
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
methodpublic  setHaltOnFailure( boolean $hof ) :
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
methodpublic  setInheritAll(  $value ) :
If true, pass all properties to the new phing project.

Defaults to true.

Parameters
Name Type Description
$value
Details
access
public
methodpublic  setInheritRefs(  $value ) :
If true, pass all references to the new phing project.

Defaults to false.

Parameters
Name Type Description
$value
Details
access
public
methodpublic  setPhingfile(  $s ) :
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
methodpublic  setTarget(  $s ) :
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
Documentation was generated by DocBlox 0.13.1.