classes/phing/Task.php
\Task
The base class for all Tasks.
Use {@link Project#createTask} to register a new Task.
- Extends from
- \ProjectComponent
- see
- \Project#createTask()
- author
- Andreas Aderhold
- copyright
- 2001,2002 THYRELL. All rights reserved
- package
- phing
- version
- $Revision: 912 $
Properties
Methods

getDescription(
)
:
stringReturns the textual description of the task
| Type | Description |
|---|---|
| string |

getLocation(
)
:
\LocationReturns the location within the buildfile this task occurs. Used
by {@link BuildException} to give detailed error messages.
| Type | Description |
|---|---|
| \Location |

getOwningTarget(
)
:
\TargetReturns the owning target of this task.
| Type | Description |
|---|---|
| \Target |

getRuntimeConfigurableWrapper(
)
:
\RuntimeConfigurableReturns the wrapper object for runtime configuration
| Type | Description |
|---|---|
| \RuntimeConfigurable |

getTaskName(
)
:
stringReturns the name of task, used only for log messages
| Type | Description |
|---|---|
| string |

getTaskType(
)
:
stringReturns the name of the task under which it was invoked,
usually the XML tagname
| Type | Description |
|---|---|
| string |

init(
)
:
Called by the parser to let the task initialize properly.
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
- throws

log(
string $msg, integer $level
=
Project
)
:
Provides a project level log event to the task.
| Name | Type | Description |
|---|---|---|
| $msg | string | The message to log |
| $level | integer | The priority of the message |
- see
- \BuildEvent
- see
- \BuildListener

main(
)
:
abstractCalled by the project to let the task do it's work. This method may be
called more than once, if the task is invoked more than once. For
example, if target1 and target2 both depend on target3, then running
phing target1 target2 will run all tasks in target3 twice.
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.

setDescription(
string $desc
)
:
Sets a textual description of the task
| Name | Type | Description |
|---|---|---|
| $desc | string | The text describing the task |

setLocation(
\Location $location
)
:
Sets the location within the buildfile this task occurs. Called by
the parser to set location information.
| Name | Type | Description |
|---|---|---|
| $location | \Location | The location object describing the position of this task within the buildfile. |

setOwningTarget(
\Target $target
)
:
Sets the owning target this task belongs to.
| Name | Type | Description |
|---|---|---|
| $target | \Target | Reference to owning target |

setRuntimeConfigurableWrapper(
\RuntimeConfigurable $wrapper
)
:
Sets the wrapper object this task should use for runtime
configurable elements.
| Name | Type | Description |
|---|---|---|
| $wrapper | \RuntimeConfigurable | The wrapper object this task should use |

setTaskName(
$name
)
:
stringSets the name of this task for log messages
| Name | Type | Description |
|---|---|---|
| $name |
| Type | Description |
|---|---|
| string |