Target

Implements \TaskContainer

The Target component. Carries all required target data. Implements the abstract class {@link TaskContainer}

author

Andreas Aderhold andi@binarycloud.com

copyright

2001,2002 THYRELL. All rights reserved

version

$Id: 8a84a6b7002c4f0d3d4c362840719a9a6a84edcd $

access

public

see
package

phing

Methods

References the project to the current component.

setProject(\Project $project) 

Arguments

$project

\Project

The reference to the current project

Returns reference to current project

getProject() : \Project

Response

\Project

Reference to current porject object

Sets the target dependencies from xml

setDepends(string $depends) 
throws

Arguments

$depends

string

Comma separated list of targetnames that depend on this target

Adds a singular dependent target name to the list

addDependency(string $dependency) 
access

public

Arguments

$dependency

string

The dependency target to add

Returns reference to indexed array of the dependencies this target has.

getDependencies() : array

Response

array

Referece to target dependencoes

Sets the name of the target

setName(string $name) 

Arguments

$name

string

Name of this target

Returns name of this target.

getName() : string
access

public

Response

string

The name of the target

Set target status. If true, target does not come in phing -list

setHidden(boolean $flag) : \Target

Arguments

$flag

boolean

Response

\Target

Get target status. If true, target does not come in phing -list

getHidden() : boolean

Response

boolean

Alias for getHidden()

isHidden() : boolean

Response

boolean

Adds a task element to the list of this targets child elements

addTask(\Task $task) 
access

public

Arguments

$task

\Task

The task object to add

Adds a runtime configurable element to the list of this targets child elements.

addDataType(\RuntimeConfigurable $rtc) 
access

public

Arguments

$rtc

\RuntimeConfigurable

The RuntimeConfigurable object

Returns an array of all tasks this target has as childrens.

getTasks() : array

The task objects are copied here. Don't use this method to modify task objects.

Response

array

Task[]

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

setIf(string $property) 
access

public

Arguments

$property

string

The property name that has to be present

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

setUnless(string $property) 
access

public

Arguments

$property

string

The property name that has to be present

Sets a textual description of this target.

setDescription(string $description) 

Arguments

$description

string

The description text

Returns the description of this target.

getDescription() : string

Response

string

The description text of this target

Returns a string representation of this target. In our case it simply returns the target name field

toString() : string

Response

string

The string representation of this target

The entry point for this class. Does some checking, then processes and performs the tasks for this target.

main() 

Performs the tasks by calling the main method of this target that actually executes the tasks.

performTasks() 

This method is for ZE2 and used for proper exception handling of task exceptions.

Tests if the property set in ifConfiditon exists.

testIfCondition() : boolean

Response

boolean

true if the property specified in $this->ifCondition exists; false otherwise

Tests if the property set in unlessCondition exists.

testUnlessCondition() : boolean

Response

boolean

true if the property specified in $this->unlessCondition exists; false otherwise

Properties

Name of target

name : string
var

Type(s)

string

Dependencies

dependencies : array
var

Type(s)

array

Holds objects of children of this target

children : array
var

Type(s)

array

The if condition from xml

ifCondition : string
var

Type(s)

string

The unless condition from xml

unlessCondition : string
var

Type(s)

string

Description of this target

description : string
var

Type(s)

string

Whether to hide target in targets list (-list -p switches)

hidden : boolean
var

Type(s)

boolean

Rreference to project

project : \Project
var

Type(s)

\Project