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)
falseDetails- Type
- boolean
Methods

addDataType(
\RuntimeConfigurable $rtc
)
:
voidAdds 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
)
:
voidAdds a singular dependent target name to the list
| Name | Type | Description |
|---|---|---|
| $dependency | string | The dependency target to add |
- Access
- public

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

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

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

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

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

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

getTasks(
)
:
arrayReturns 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(
)
:
voidThe entry point for this class. Does some checking, then processes and performs the tasks for this target.

performTasks(
)
:
voidPerforms 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
)
:
voidSets 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
)
:
voidSets a textual description of this target.
| Name | Type | Description |
|---|---|---|
| $description | string | The description text |

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

setIf(
string $property
)
:
voidSet 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
)
:
voidSets the name of the target
| Name | Type | Description |
|---|---|---|
| $name | string | Name of this target |

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

setUnless(
string $property
)
:
voidSet 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(
)
:
booleanTests 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(
)
:
booleanTests 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 |