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 |
|---|---|
| author | Hans Lellelid |
| version | $Id: dcdbd4e3b1d33d6817c47b0b396f0708fb8cecf1 $ |
| package | phing |
__construct()
_makeCircularException($end, $stk)
_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)
addBuildListener(\BuildListener $listener)
addDataTypeDefinition(string $typeName, string $typeClass, string $classpath)
stringName of the type.
stringThe class to use.
stringThe classpath to use.
addReference(string $name, object $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
string
object
addTaskDefinition(string $name, string $class, string $classpath)
stringName of tag.
stringThe class path to use.
stringThe classpat to use.
copyInheritedProperties(\Project $other)
To copy all "user" properties, you will also have to call copyUserProperties.
| since | phing 2.0 |
|---|
copyUserProperties(\Project $other) : void
To copy all "user" properties, you will also have to call copyInheritedProperties.
| since | phing 2.0 |
|---|
createCondition(string $conditionType) : \Condition
createDataType(string $typeName) : object
stringType name
\BuildException |
Exception |
|---|
objectA datatype objectcreateTask(string $taskType) : \Task
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.
stringTask name
\BuildException |
Exception |
|---|
\TaskA task objectexecuteTarget(string $targetName) : void
executeTargets(array $targetNames) : void
fireBuildFinished($exception)
fireBuildStarted()
fireMessageLogged($object, $message, $priority)
fireMessageLoggedEvent($event, $message, $priority)
fireTargetFinished($target, $exception)
fireTargetStarted($target)
fireTaskFinished($task, $exception)
fireTaskStarted($task)
getBasedir() : \PhingFile
| access | public |
|---|---|
| author | Andreas Aderhold, andi@binarycloud.com |
\BuildException |
|---|
\PhingFileBasedir PhingFile objectgetBuildListeners()
getDataTypeDefinitions() : array
arraygetDefaultTarget() : string
stringgetDescription() : string | null
stringnull
getGlobalFilterSet()
getName() : string
getPhingVersion() : string
stringgetProperties() : array
arrayA hashtable containing all properties
(including user properties).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.getReference(string $key) : object
stringThe reference id/key.
objectReference or null if not definedgetReferences() : array
arraygetTargets() : array
arraygetTaskDefinitions() : array
arraygetUserProperties() : \a
\ahashtable containing just the user propertiesgetUserProperty(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.init()
log(string $msg, int $level)
string
int
logObject($obj, $msg, $level)
removeBuildListener(\BuildListener $listener)
replaceProperties(\value $value) : \the
| exception | BuildException if the given value has an unclosed
property name, e.g. ${xxx |
|---|
\valueThe string to be scanned for property references.
May be null.
\thegiven string with embedded property names replaced
by values, or null if the given string is
null.resolveFile($fileName, $rootDir)
setDefaultTarget(string $targetName)
string
setDescription(string $description)
string
setInheritedProperty(string $name, string $value)
Any previous value is overwritten. Also marks these properties as properties that have not come from the command line.
| see | \#setProperty() |
|---|
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setName(string $name) : void
setNewProperty(string $name, string $value)
If the property exists already, a message is logged and the method returns with no other effect.
| since | 2.0 |
|---|
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setPhingVersion(string $version)
string
setProperty(string $name, string $value) : void
Any existing property of the same name is overwritten, unless it is a user property.
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setSystemProperties() : void
setUserProperty(string $name, string $value)
Any previous value is overwritten.
| see | \#setProperty() |
|---|
stringThe name of property to set.
Must not be null.
stringThe new value of the property.
Must not be null.
setPropertyInternal(\name $name, \value $value)
\nameThe name of the property.
Must not be null.
\valueThe property value. Must not be null.
$basedir
$defaultTarget
$description
$fileUtils
$globalFilterSet
$globalFilters
$inheritedProperties
Mapping is String to String.
$inputHandler
$listeners
$name
$phingVersion
$properties
$references
$targets
$taskdefs
$typedefs
$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.
MSG_DEBUG
MSG_ERR
MSG_INFO
MSG_VERBOSE
MSG_WARN