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
$Revision: 915 $ $Date: 2010-10-12 04:30:52 +0200 (Tue, 12 Oct 2010) $  

\Target

Package: phing

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

@author Andreas Aderhold andi@binarycloud.com

Implements
\TaskContainer
See
\TaskContainer  
Access
public  
Copyright
2001,2002 THYRELL. All rights reserved  
Version
$Revision: 915 $ $Date: 2010-10-12 04:30:52 +0200 (Tue, 12 Oct 2010) $  

Properties

Propertyprivate  $children= 'array()'

holds objects of children of this target

Default valuearray()Details
Type
n/a
Propertyprivate  $dependencies= 'array()'

dependencies

Default valuearray()Details
Type
n/a
Propertyprivate  $description= ''

description of this target

Details
Type
n/a
Propertyprivateboolean  $hidden= 'false'

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

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

the if cond. from xml

Default value""Details
Type
n/a
Propertyprivate  $name= ''

name of target

Details
Type
n/a
Propertyprivate  $project= ''

reference to project

Details
Type
n/a
Propertyprivate  $unlessCondition= '""'

the unless cond. from xml

Default value""Details
Type
n/a

Methods

methodpublicaddDataType(  $rtc ) : void

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

@param object The RuntimeConfigurabel object

Parameters
Name Type Description
$rtc
Details
Access
public  
methodpublicaddDependency(  $dependency ) : void

Adds a singular dependent target name to the list

@param string The dependency target to add

Parameters
Name Type Description
$dependency
Details
Access
public  
methodpublicaddTask(  $task ) : void

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

@param object The task object to add

Parameters
Name Type Description
$task
Details
Access
public  
methodpublicgetDependencies( ) : void

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

@return array Referece to target dependencoes

methodpublicgetDescription( ) : void

Returns the description of this target.

@return 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( ) : void

Returns name of this target.

@return string The name of the target

Details
Access
public  
methodpublicgetProject( ) : void

Returns reference to current project

@return 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(  $depends ) : void

Sets the target dependencies from xml

@param string $depends Comma separated list of targetnames that depend on this target

Parameters
Name Type Description
$depends
Throws
Exception Description
\BuildException
methodpublicsetDescription(  $description ) : void

Sets a textual description of this target.

@param string The description text

Parameters
Name Type Description
$description
methodpublicsetHidden(  $flag ) : \Target

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

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

@param string The property name that has to be present

Parameters
Name Type Description
$property
Details
Access
public  
methodpublicsetName(  $name ) : void

Sets the name of the target

@param string Name of this target

Parameters
Name Type Description
$name
methodpublicsetProject(  $project ) : void

References the project to the current component.

@param Project The reference to the current project

Parameters
Name Type Description
$project
methodpublicsetUnless(  $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

@param string The property name that has to be present

Parameters
Name Type Description
$property
Details
Access
public  
methodprivatetestIfCondition( ) : void

Tests if the property set in ifConfiditon exists.

@return boolean

true

if the property specified in

$this->ifCondition

exists;

false

otherwise

methodprivatetestUnlessCondition( ) : void

Tests if the property set in unlessCondition exists.

@return boolean

true

if the property specified in

$this->unlessCondition

exists;

false

otherwise

methodpublictoString( ) : void

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

@return string The string representation of this target

Documentation was generated by DocBlox 0.17.1.