The Target component.

Carries all required target data. Implements the abstract class TaskContainer

author | Andreas Aderhold <andi@binarycloud.com> @copyright 2001,2002 THYRELL. All rights reserved @version $Id: b6779ff7860ec7a7a84d74a40ffcc9efa75255f7 $ @access public @see TaskContainer @package phing

### Methods

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

    addDataType(\RuntimeConfigurable $rtc)

access | public

### Parameters

#### $rtc

`\RuntimeConfigurable`

The RuntimeConfigurable object

## Adds a singular dependent target name to the list

    addDependency(string $dependency)

access | public

### Parameters

#### $dependency

`string`

The dependency target to add

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

    addTask(\Task $task)

Must be implemented by derived class

access | public

### Parameters

#### $task

`\Task`

The task object to add

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

    getDependencies() : array

### Returns

`array`Referece to target dependencoes

## Returns the description of this target.

    getDescription() : string

### Returns

`string`The description text of this target

## Get target status.

    getHidden() : boolean

If true, target does not come in phing -list

### Returns

`boolean`

## Returns name of this target.

    getName() : string

access | public

### Returns

`string`The name of the target

## Returns reference to current project

    getProject() : \Project

### Returns

`\Project`Reference to current porject 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.

### Returns

`array`Task[]

## Alias for getHidden()

    isHidden() : boolean

### Returns

`boolean`

## The entry point for this class.

    main()

Does some checking, then processes and performs the tasks for this target.

## 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.

## Sets the target dependencies from xml

    setDepends(string $depends)

### Parameters

#### $depends

`string`

Comma separated list of targetnames that depend on this target

### Exceptions

`\BuildException` |

## Sets a textual description of this target.

    setDescription(string $description)

### Parameters

#### $description

`string`

The description text

## Set target status.

    setHidden(boolean $flag) : \Target

If true, target does not come in phing -list

### Parameters

#### $flag

`boolean`

### Returns

`\Target`

## Set the if-condition from the XML tag, if any.

    setIf(string $property)

The property name given as parameter must be present so the if condition evaluates to true

access | public

### Parameters

#### $property

`string`

The property name that has to be present

## Sets the name of the target

    setName(string $name)

### Parameters

#### $name

`string`

Name of this target

## References the project to the current component.

    setProject(\Project $project)

### Parameters

#### $project

`\Project`

The reference to the current project

## Set the unless-condition from the XML tag, if any.

    setUnless(string $property)

The property name given as parameter must be present so the unless condition evaluates to true

access | public

### Parameters

#### $property

`string`

The property name that has to be present

## Returns a string representation of this target.

    toString() : string

In our case it simply returns the target name field

### Returns

`string`The string representation of this target

## Tests if the property set in ifConfiditon exists.

    testIfCondition() : boolean

### Returns

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

## Tests if the property set in unlessCondition exists.

    testUnlessCondition() : boolean

### Returns

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

### Properties

##

    $children : array

##

    $dependencies : array

##

    $description : string

##

    $hidden : boolean

##

    $ifCondition : string

##

    $name : string

##

    $project : \Project

##

    $unlessCondition : string