Executes a command on the shell.
Use Project#createTask to register a new Task.
author | Andreas Aderhold |
---|---|
author | Hans Lellelid |
author | Christian Weiske |
version | $Id: 2690e22f87a077341ba91b2c1908f85a635d7b21 $ |
package | phing.tasks.system |
copyright | 2001,2002 THYRELL. All rights reserved |
__construct()
createArg() : \CommandlineArgument
\CommandlineArgument
Argument objectgetDescription() : string
inherited_from | \Task::getDescription() |
---|
string
The text description of the taskgetLocation() : \Location
Used by BuildException to give detailed error messages.
inherited_from | \Task::getLocation() |
---|
\Location
The location object describing the position of this
task within the buildfile.getProject() : \Project
inherited_from | \ProjectComponent::getProject() |
---|---|
inherited_from | \Task::getProject() |
\Project
Reference to current porject objectgetRuntimeConfigurableWrapper() : \RuntimeConfigurable
inherited_from | \Task::getRuntimeConfigurableWrapper() |
---|
\RuntimeConfigurable
The wrapper object used by this taskgetTaskName() : string
inherited_from | \Task::getTaskName() |
---|
string
Name of this taskgetTaskType() : string
inherited_from | \Task::getTaskType() |
---|
string
The type of this task (XML Tag)init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
inherited_from | \Task::init() |
---|
\BuildException |
---|
log(string $msg, integer $level)
see | \global\BuildEvent |
---|---|
see | \global\BuildListener |
inherited_from | \Task::log() |
string
The message to log
integer
The priority of the message
main() : void
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.
maybeConfigure()
inherited_from | \Task::maybeConfigure() |
---|
perform()
inherited_from | \Task::perform() |
---|
setCheckreturn(boolean $checkreturn) : void
boolean
If the return code shall be checked
setCommand(mixed $command) : void
mixed
String or string-compatible (e.g. w/ __toString()).
setDescription(string $desc)
inherited_from | \Task::setDescription() |
---|
string
The text describing the task
setDir(\PhingFile $dir) : void
setError(\PhingFile $f) : void
setEscape(boolean $escape) : void
boolean
If the command shall be escaped or not
setExecutable(mixed $executable) : void
mixed
String or string-compatible (e.g. w/ __toString()).
setLevel(string $level) : void
string
Log level
setLocation(\Location $location)
Called by the parser to set location information.
inherited_from | \Task::setLocation() |
---|
setLogoutput(boolean $logOutput) : void
boolean
If output shall be logged visibly
setOs(string $os) : void
string
Operating system string (e.g. "Linux")
setOutput(\PhingFile $f) : void
setOutputProperty(string $prop) : void
string
Property name
setOwningTarget(\Target $target)
setPassthru(boolean $passthru) : void
boolean
If passthru shall be used
setProject(\Project $project)
inherited_from | \ProjectComponent::setProject() |
---|---|
inherited_from | \Task::setProject() |
setReturnProperty(string $prop) : void
string
Property name
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
inherited_from | \Task::setRuntimeConfigurableWrapper() |
---|
setSpawn(boolean $spawn) : void
boolean
If the command is to be run in the background
setTaskName(string $name) : string
inherited_from | \Task::setTaskName() |
---|
string
string
A string representing the name of this task for logsetTaskType(string $name)
Usually this is the name of the XML tag
inherited_from | \Task::setTaskType() |
---|
string
The type of this task (XML Tag)
buildCommand() : void
uses | \global\$command |
---|
cleanup(integer $return, array $output) : void
integer
Return code
array
Array with command output
executeCommand() : array
array
array(return code, array with output)getRegisterSlot(string $slotName)
inherited_from | \Task::getRegisterSlot() |
---|
string
isApplicable() : boolean
boolean
False if the exec command shall not be runprepare() : void
changes to the specified directory.
$checkreturn : boolean
$command : string
$commandline : \Commandline
$description : string
inherited_from | \Task::$$description |
---|
$dir : \PhingFile
$error : \File
$escape : boolean
$logLevel : integer
$logOutput : boolean
$os : string
$output : \File
$outputProperty : string
$passthru : boolean
$project : \Project
inherited_from | \ProjectComponent::$$project |
---|---|
inherited_from | \Task::$$project |
$realCommand : string
$returnProperty : string
$spawn : boolean
$taskName : string
inherited_from | \Task::$$taskName |
---|
$taskType : string
inherited_from | \Task::$$taskType |
---|