The Phing project class. Represents a completely configured Phing project.
The class defines the project and all tasks/targets. It also contains methods to start a build as well as some properties and FileSystem abstraction.
| author |
Andreas Aderhold andi@binarycloud.com |
|---|---|
| author |
Hans Lellelid hans@xmpl.org |
| version |
$Id: 747f836b665364f27fc2f8fa777d882a877a9743 $ |
| package |
phing |
__construct()
init()
getGlobalFilterSet()
setProperty(string $name, string $value) : void
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setNewProperty(string $name, string $value)
| since | 2.0 |
|---|
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setUserProperty(string $name, string $value)
| see | \#setProperty() |
|---|
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setInheritedProperty(string $name, string $value)
| see | \#setProperty() |
|---|
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setPropertyInternal($name, $value)
getProperty(string $name) : string
stringThe name of the property.
May be null, in which case
the return value is also null.
stringThe property value, or null for no match
or if a null name is provided.
replaceProperties($value) : \the
| exception |
BuildException if the given value has an unclosed
property name, e.g. |
|---|
\thegiven string with embedded property names replaced
by values, or null if the given string is
null.
getUserProperty(string $name) : string
stringThe name of the property.
May be null, in which case
the return value is also null.
stringThe property value, or null for no match
or if a null name is provided.
getProperties() : array
arrayA hashtable containing all properties (including user properties).
getUserProperties() : \a
\ahashtable containing just the user properties
copyUserProperties(\Project $other) : void
To copy all "user" properties, you will also have to call {@link #copyInheritedProperties copyInheritedProperties}.
| since |
phing 2.0 |
|---|
copyInheritedProperties(\Project $other)
To copy all "user" properties, you will also have to call {@link #copyUserProperties copyUserProperties}.
| since |
phing 2.0 |
|---|
setDefaultTarget(string $targetName)
string
getDefaultTarget() : string
string
setName(string $name) : void
| access |
public |
|---|---|
| author |
Andreas Aderhold, andi@binarycloud.com |
stringname of project
getName() : string
| access |
public |
|---|---|
| author |
Andreas Aderhold, andi@binarycloud.com |
stringprojectname
setDescription(string $description)
string
getDescription() : string|null
string|null
setPhingVersion(string $version)
string
getPhingVersion() : string
string
getBasedir() : \PhingFile
| access |
public |
|---|---|
| throws | |
| author |
Andreas Aderhold, andi@binarycloud.com |
\PhingFileBasedir PhingFile object
setSystemProperties() : void
addTaskDefinition(string $name, string $class, string $classpath = null)
stringName of tag.
stringThe class path to use.
stringThe classpat to use.
getTaskDefinitions() : array
array
addDataTypeDefinition(string $typeName, string $typeClass, string $classpath = null)
stringName of the type.
stringThe class to use.
stringThe classpath to use.
getDataTypeDefinitions() : array
array
addTarget(string $targetName, \Target $target)
addOrReplaceTarget(string $targetName, \Target $target)
getTargets() : array
array
createTask(string $taskType) : \Task
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.
| throws |
Exception |
|---|
stringTask name
\TaskA task object
createCondition(string $conditionType) : \Condition
createDataType(string $typeName) : object
| throws |
Exception |
|---|
stringType name
objectA datatype object
executeTargets(array $targetNames) : void
| throws |
|---|
arrayList of target names to execute
executeTarget(string $targetName) : void
| throws |
|---|
stringName of Target to execute
resolveFile($fileName, $rootDir = null)
_topoSort(string $root, array $targets) : \An
stringis 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.
arrayis a array representing a "name to Target" mapping
\Anarray of Strings with the names of the targets in sorted order.
_tsort($root, $targets, $state, $visiting, $ret)
_makeCircularException($end, $stk)
addReference(string $name, object $object)
string
object
getReferences() : array
array
getReference(string $key) : object
stringThe reference id/key.
objectReference or null if not defined
log(string $msg, int $level = \Project::MSG_INFO)
string
int
logObject($obj, $msg, $level)
removeBuildListener(\BuildListener $listener)
getBuildListeners()
fireBuildStarted()
fireBuildFinished($exception)
fireTargetStarted($target)
fireTargetFinished($target, $exception)
fireTaskStarted($task)
fireTaskFinished($task, $exception)
fireMessageLoggedEvent($event, $message, $priority)
fireMessageLogged($object, $message, $priority)
MSG_DEBUG
MSG_VERBOSE
MSG_INFO
MSG_WARN
MSG_ERR
targets :
globalFilterSet :
globalFilters :
properties :
userProperties :
Note that these key/value pairs are also always put into the project properties, so only the project properties need to be queried. Mapping is String to String.
inheritedProperties :
Mapping is String to String.
taskdefs :
typedefs :
references :
inputHandler :
basedir :
defaultTarget :
name :
description :
phingVersion :
fileUtils :
listeners :