Target.php

Show: inherited
Table of Contents

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

Package: phing

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

Propertyprivatearray  $children= 'array()'

Holds objects of children of this target

Default valuearray()Details
Type
array
Propertyprivatearray  $dependencies= 'array()'

Dependencies

Default valuearray()Details
Type
array
Propertyprivatestring  $description= ''

Description of this target

Details
Type
string
Propertyprivateboolean  $hidden= 'false'

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

Default valuefalseDetails
Type
boolean
Propertyprivatestring  $ifCondition= '""'

The if condition from xml

Default value""Details
Type
string
Propertyprivatestring  $name= ''

Name of target

Details
Type
string
Propertyprivate\Project  $project= ''

Rreference to project

Details
Type
\Project
Propertyprivatestring  $unlessCondition= '""'

The unless condition from xml

Default value""Details
Type
string

Methods

methodpublicaddDataType( \RuntimeConfigurable $rtc ) : void

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

Parameters
Name Type Description
$rtc \RuntimeConfigurable

The RuntimeConfigurable object

Details
Access
public  
methodpublicaddDependency( string $dependency ) : void

Adds a singular dependent target name to the list

Parameters
Name Type Description
$dependency string

The dependency target to add

Details
Access
public  
methodpublicaddTask( \Task $task ) : void

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

Parameters
Name Type Description
$task \Task

The task object to add

Details
Access
public  
methodpublicgetDependencies( ) : array

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

Returns
Type Description
array Referece to target dependencoes
methodpublicgetDescription( ) : string

Returns the description of this target.

Returns
Type Description
string The description text of this target
methodpublicgetHidden( ) : boolean

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

Returns
Type Description
boolean
methodpublicgetName( ) : string

Returns name of this target.

Returns
Type Description
string The name of the target
Details
Access
public  
methodpublicgetProject( ) : \Project

Returns reference to current project

Returns
Type Description
\Project Reference to current porject object
methodpublicgetTasks( ) : 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.

Returns
Type Description
array Task[]
methodpublicisHidden( ) : boolean

Alias for getHidden()

Returns
Type Description
boolean
methodpublicmain( ) : void

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

methodpublicperformTasks( ) : 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.

methodpublicsetDepends( string $depends ) : void

Sets the target dependencies from xml

Parameters
Name Type Description
$depends string

Comma separated list of targetnames that depend on this target

Throws
Exception Description
\BuildException
methodpublicsetDescription( string $description ) : void

Sets a textual description of this target.

Parameters
Name Type Description
$description string

The description text

methodpublicsetHidden( boolean $flag ) : \Target

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

Parameters
Name Type Description
$flag boolean
Returns
Type Description
\Target
methodpublicsetIf( 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

Parameters
Name Type Description
$property string

The property name that has to be present

Details
Access
public  
methodpublicsetName( string $name ) : void

Sets the name of the target

Parameters
Name Type Description
$name string

Name of this target

methodpublicsetProject( \Project $project ) : void

References the project to the current component.

Parameters
Name Type Description
$project \Project

The reference to the current project

methodpublicsetUnless( 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

Parameters
Name Type Description
$property string

The property name that has to be present

Details
Access
public  
methodprivatetestIfCondition( ) : boolean

Tests if the property set in ifConfiditon exists.

Returns
Type Description
boolean <code>true</code> if the property specified in <code>$this->ifCondition</code> exists; <code>false</code> otherwise
methodprivatetestUnlessCondition( ) : boolean

Tests if the property set in unlessCondition exists.

Returns
Type Description
boolean <code>true</code> if the property specified in <code>$this->unlessCondition</code> exists; <code>false</code> otherwise
methodpublictoString( ) : string

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

Returns
Type Description
string The string representation of this target
Documentation was generated by DocBlox 0.18.1.