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

\Target

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
package
phing
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 valuearrayDetails
Type
Propertyprivate  $dependencies= 'array'

dependencies

Default valuearrayDetails
Type
Propertyprivate  $description= ''

description of this target

Details
Type
Propertyprivateboolean  $hidden= 'false'

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

Default valuefalseDetails
Type
boolean
Propertyprivate  $ifCondition= ''

the if cond. from xml

Details
Type
Propertyprivate  $name= ''

name of target

Details
Type
Propertyprivate  $project= ''

reference to project

Details
Type
Propertyprivate  $unlessCondition= ''

the unless cond. from xml

Details
Type

Methods

methodpublic  addDataType(  $rtc ) :
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
methodpublic  addDependency(  $dependency ) :
Adds a singular dependent target name to the list

@param string The dependency target to add

Parameters
Name Type Description
$dependency
Details
access
public
methodpublic  addTask(  $task ) :
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
methodpublic  getDependencies( ) :
Returns reference to indexed array of the dependencies this target has.

@return array Referece to target dependencoes

methodpublic  getDescription( ) :
Returns the description of this target.

@return string The description text of this target

methodpublic  getHidden( ) : boolean
Get target status. If true, target does not come in phing -list
Returns
Type Description
boolean
methodpublic  getName( ) :
Returns name of this target.

@return string The name of the target

Details
access
public
methodpublic  getProject( ) :
Returns reference to current project

@return Project Reference to current porject object

methodpublic  getTasks( ) : 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
methodpublic  isHidden( ) : boolean
Alias for getHidden()
Returns
Type Description
boolean
methodpublic  main( ) :
The entry point for this class. Does some checking, then processes and performs the tasks for this target.
methodpublic  performTasks( ) :
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.

methodpublic  setDepends(  $depends ) :
Sets the target dependencies from xml

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

Parameters
Name Type Description
$depends
Details
throws
methodpublic  setDescription(  $description ) :
Sets a textual description of this target.

@param string The description text

Parameters
Name Type Description
$description
methodpublic  setHidden(  $flag ) : \Target
Set target status. If true, target does not come in phing -list
Parameters
Name Type Description
$flag
Returns
Type Description
\Target
methodpublic  setIf(  $property ) :
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
methodpublic  setName(  $name ) :
Sets the name of the target

@param string Name of this target

Parameters
Name Type Description
$name
methodpublic  setProject(  $project ) :
References the project to the current component.

@param Project The reference to the current project

Parameters
Name Type Description
$project
methodpublic  setUnless(  $property ) :
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
methodprivate  testIfCondition( ) :
Tests if the property set in ifConfiditon exists.

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

methodprivate  testUnlessCondition( ) :
Tests if the property set in unlessCondition exists.

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

methodpublic  toString( ) :
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.13.1.