The Phing project class. Represents a completely configured Phing project.



_topoSort(
\$root $root, \$targets $targets
)
:
\AnTopologically sort a set of Targets.
Parameters
| Name |
Type |
Description |
| $root |
\$root |
is the (String) name of the root Target. The sort is created in such a way that the sequence of Targets until the root target is the minimum possible such sequence.
|
| $targets |
\$targets |
is a array representing a "name to Target" mapping
|
Returns



addDataTypeDefinition(
$typeName, $typeClass, string $classpath
=
null
)
:
Adds a data type definition.
Parameters
| Name |
Type |
Description |
| $typeName |
|
|
| $typeClass |
|
|
| $classpath |
string |
The classpat to use. |



addReference(
$name, $object
)
:
Adds a reference to an object. This method is called when the parser
detects a id="foo" attribute. It passes the id as $name and a reference
to the object assigned to this id as $value
Parameters
| Name |
Type |
Description |
| $name |
|
|
| $object |
|
|



addTarget(
$targetName, $target
)
:
add a new target to the project
Parameters
| Name |
Type |
Description |
| $targetName |
|
|
| $target |
|
|



addTaskDefinition(
string $name, string $class, string $classpath
=
null
)
:
Adds a task definition.
Parameters
| Name |
Type |
Description |
| $name |
string |
Name of tag. |
| $class |
string |
The class path to use. |
| $classpath |
string |
The classpat to use. |



copyInheritedProperties(
\other $other
)
:
Copies all user properties that have not been set on the
command line or a GUI tool from this instance to the Project
instance given as the argument.
To copy all "user" properties, you will also have to call
{@link #copyUserProperties copyUserProperties}.
Parameters
| Name |
Type |
Description |
| $other |
\other |
the project to copy the properties to. Must not be null. |
Details
- since
- phing 2.0



copyUserProperties(
\Project $other
)
:
voidCopies all user properties that have been set on the command
line or a GUI tool from this instance to the Project instance
given as the argument.
To copy all "user" properties, you will also have to call
{@link #copyInheritedProperties copyInheritedProperties}.
Parameters
| Name |
Type |
Description |
| $other |
\Project |
the project to copy the properties to. Must not be null. |
Details
- since
- phing 2.0



createDataType(
string $typeName
)
:
objectCreate a datatype instance and return reference to it
See createTask() for explanation how this works
Parameters
| Name |
Type |
Description |
| $typeName |
string |
Type name |
Returns
Details
- throws
- Exception



createTask(
string $taskType
)
:
\TaskCreate a new task instance and return reference to it. This method is
sorta factory like. A _local_ instance is created and a reference returned to
that instance. Usually PHP destroys local variables when the function call
ends. But not if you return a reference to that variable.
This is kinda error prone, because if no reference exists to the variable
it is destroyed just like leaving the local scope with primitive vars. There's no
central place where the instance is stored as in other OOP like languages.
[HL] Well, ZE2 is here now, and this is still working. We'll leave this alone
unless there's any good reason not to.
Parameters
| Name |
Type |
Description |
| $taskType |
string |
Task name |
Returns
Details
- throws
- Exception



executeTarget(
string $targetName
)
:
voidExecutes a target
Parameters
| Name |
Type |
Description |
| $targetName |
string |
Name of Target to execute |
Details
- throws



executeTargets(
array $targetNames
)
:
voidExecutes a list of targets
Parameters
| Name |
Type |
Description |
| $targetNames |
array |
List of target names to execute |
Details
- throws



getBasedir(
)
:
\PhingFileReturns the basedir of this project
Returns
| Type |
Description |
| \PhingFile |
|
Details
- access
- public
- author
- Andreas Aderhold, andi@binarycloud.com
- throws



getDataTypeDefinitions(
)
:



getName(
)
:
stringReturns the name of this project
Returns
Details
- access
- public
- author
- Andreas Aderhold, andi@binarycloud.com



getProperty(
string $name
)
:
stringReturns the value of a property, if it is set.
Parameters
| Name |
Type |
Description |
| $name |
string |
The name of the property. May be null, in which case the return value is also null.
|
Returns



getReference(
string $key
)
:
\ReferenceReturns a specific reference.
Parameters
| Name |
Type |
Description |
| $key |
string |
The reference id/key.
|
Returns
| Type |
Description |
| \Reference |
|



getUserProperty(
string $name
)
:
stringReturns the value of a user property, if it is set.
Parameters
| Name |
Type |
Description |
| $name |
string |
The name of the property. May be null, in which case the return value is also null.
|
Returns



log(
$msg, $level
=
Project
)
:
Abstracting and simplifyling Logger calls for project messages
Parameters
| Name |
Type |
Description |
| $msg |
|
|
| $level |
|
|



replaceProperties(
\value $value
)
:
\theReplaces ${} style constructions in the given value with the
string value of the corresponding data types.
Parameters
| Name |
Type |
Description |
| $value |
\value |
The string to be scanned for property references. May be null.
|
Returns
Details
- exception
- BuildException if the given value has an unclosed
property name, e.g.
${xxx



setBasedir(
$dir
)
:
Set basedir object from xml
Parameters
| Name |
Type |
Description |
| $dir |
|
|



setDescription(
$description
)
:
Set the projects description
Parameters
| Name |
Type |
Description |
| $description |
|
|



setInheritedProperty(
string $name, string $value
)
:
Sets a user property, which cannot be overwritten by set/unset
property calls. Any previous value is overwritten. Also marks
these properties as properties that have not come from the
command line.
Parameters
| Name |
Type |
Description |
| $name |
string |
The name of property to set. Must not be null.
|
| $value |
string |
The new value of the property. Must not be null.
|
Details
- see
- \#setProperty()



setInputHandler(
$handler
)
:
Sets the input handler
Parameters
| Name |
Type |
Description |
| $handler |
|
|



setName(
string $name
)
:
voidSets the name of the current project
Parameters
| Name |
Type |
Description |
| $name |
string |
name of project |
Details
- access
- public
- author
- Andreas Aderhold, andi@binarycloud.com



setNewProperty(
string $name, string $value
)
:
Sets a property if no value currently exists. If the property
exists already, a message is logged and the method returns with
no other effect.
Parameters
| Name |
Type |
Description |
| $name |
string |
The name of property to set. Must not be null.
|
| $value |
string |
The new value of the property. Must not be null.
|
Details
- since
- 2.0



setPhingVersion(
$version
)
:
Set the minimum required phing version *
Parameters
| Name |
Type |
Description |
| $version |
|
|



setProperty(
string $name, string $value
)
:
voidSets a property. Any existing property of the same name
is overwritten, unless it is a user property.
Parameters
| Name |
Type |
Description |
| $name |
string |
The name of property to set. Must not be null.
|
| $value |
string |
The new value of the property. Must not be null.
|



setPropertyInternal(
\name $name, \value $value
)
:
Sets a property unless it is already defined as a user property
(in which case the method returns silently).
Parameters
| Name |
Type |
Description |
| $name |
\name |
The name of the property. Must not be null.
|
| $value |
\value |
The property value. Must not be null.
|



setUserProperty(
string $name, string $value
)
:
Sets a user property, which cannot be overwritten by
set/unset property calls. Any previous value is overwritten.
Parameters
| Name |
Type |
Description |
| $name |
string |
The name of property to set. Must not be null.
|
| $value |
string |
The new value of the property. Must not be null.
|
Details
- see
- \#setProperty()