Target.php
The Target component. Carries all required target data. Implements the abstract class {@link TaskContainer}
@author Andreas Aderhold andi@binarycloud.com
- Access
- public
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Package
- phing
- See
- \TaskContainer
- Version
- $Id: b6779ff7860ec7a7a84d74a40ffcc9efa75255f7 $
\Target
The Target component. Carries all required target data. Implements the abstract class {@link TaskContainer}
@author Andreas Aderhold andi@binarycloud.com
- Parent(s)
- \TaskContainer
- See
- \TaskContainer
- Access
- public
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Version
- $Id: b6779ff7860ec7a7a84d74a40ffcc9efa75255f7 $
Properties


array
$children= 'array()'
Holds objects of children of this target
array()
Details- Type
- array


boolean
$hidden= 'false'
Whether to hide target in targets list (-list -p switches)
false
Details- Type
- boolean
Methods


addDataType(
\RuntimeConfigurable $rtc
)
:
void
Adds a runtime configurable element to the list of this targets child elements.
Name | Type | Description |
---|---|---|
$rtc | \RuntimeConfigurable | The RuntimeConfigurable object |
- Access
- public


addDependency(
string $dependency
)
:
void
Adds a singular dependent target name to the list
Name | Type | Description |
---|---|---|
$dependency | string | The dependency target to add |
- Access
- public


addTask(
\Task $task
)
:
void
Adds a task element to the list of this targets child elements
Name | Type | Description |
---|---|---|
$task | \Task | The task object to add |
- Access
- public


getDependencies(
)
:
array
Returns reference to indexed array of the dependencies this target has.
Type | Description |
---|---|
array | Referece to target dependencoes |


getDescription(
)
:
string
Returns the description of this target.
Type | Description |
---|---|
string | The description text of this target |


getHidden(
)
:
boolean
Get target status. If true, target does not come in phing -list
Type | Description |
---|---|
boolean |


getName(
)
:
string
Returns name of this target.
Type | Description |
---|---|
string | The name of the target |
- Access
- public


getProject(
)
:
\Project
Returns reference to current project
Type | Description |
---|---|
\Project | Reference to current porject object |


getTasks(
)
:
array
Returns an array of all tasks this target has as childrens.
The task objects are copied here. Don't use this method to modify task objects.
Type | Description |
---|---|
array | Task[] |


main(
)
:
void
The entry point for this class. Does some checking, then processes and performs the tasks for this target.


performTasks(
)
:
void
Performs the tasks by calling the main method of this target that actually executes the tasks.
This method is for ZE2 and used for proper exception handling of task exceptions.


setDepends(
string $depends
)
:
void
Sets the target dependencies from xml
Name | Type | Description |
---|---|---|
$depends | string | Comma separated list of targetnames that depend on this target |
Exception | Description |
---|---|
\BuildException |


setDescription(
string $description
)
:
void
Sets a textual description of this target.
Name | Type | Description |
---|---|---|
$description | string | The description text |


setHidden(
boolean $flag
)
:
\Target
Set target status. If true, target does not come in phing -list
Name | Type | Description |
---|---|---|
$flag | boolean |
Type | Description |
---|---|
\Target |


setIf(
string $property
)
:
void
Set the if-condition from the XML tag, if any. The property name given as parameter must be present so the if condition evaluates to true
Name | Type | Description |
---|---|---|
$property | string | The property name that has to be present |
- Access
- public


setName(
string $name
)
:
void
Sets the name of the target
Name | Type | Description |
---|---|---|
$name | string | Name of this target |


setProject(
\Project $project
)
:
void
References the project to the current component.
Name | Type | Description |
---|---|---|
$project | \Project | The reference to the current project |


setUnless(
string $property
)
:
void
Set the unless-condition from the XML tag, if any. The property name given as parameter must be present so the unless condition evaluates to true
Name | Type | Description |
---|---|---|
$property | string | The property name that has to be present |
- Access
- public


testIfCondition(
)
:
boolean
Tests if the property set in ifConfiditon exists.
Type | Description |
---|---|
boolean | <code>true</code> if the property specified in <code>$this->ifCondition</code> exists; <code>false</code> otherwise |


testUnlessCondition(
)
:
boolean
Tests if the property set in unlessCondition exists.
Type | Description |
---|---|
boolean | <code>true</code> if the property specified in <code>$this->unlessCondition</code> exists; <code>false</code> otherwise |