Executes a command on the shell.
Use \Project#createTask to register a new Task.
author |
Andreas Aderhold andi@binarycloud.com |
---|---|
author |
Hans Lellelid hans@xmpl.org |
author |
Christian Weiske cweiske@cweiske.de |
version |
$Id: 46e68ec1dbe2d54ad8a6bbbb466448a85e7b4143 $ |
package |
phing.tasks.system |
__construct()
buildCommand() : void
throws | |
---|---|
uses | |
cleanup(integer $return, array $output) : void
throws |
---|
integer
Return code
array
Array with command output
createArg() : \CommandlineArgument
executeCommand() : array
array
array(return code, array with output)
getDescription() : string
string
The text description of the task
getLocation() : \Location
getOwningTarget() : \Target
getProject() : \Project
getRegisterSlot(string $slotName) : \RegisterSlot
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getTaskName() : string
string
Name of this task
getTaskType() : string
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.
throws | |
---|---|
isApplicable() : boolean
boolean
False if the exec command shall not be run
log(string $msg, integer $level = \Project::MSG_INFO) : void
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
perform()
throws | |
---|---|
prepare() : void
changes to the specified directory.
throws | |
---|---|
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)
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
throws |
---|
string
Log level
setLocation(\Location $location)
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) : void
setReturnProperty(string $prop) : void
string
Property name
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setSpawn(boolean $spawn) : void
boolean
If the command is to be run in the background
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
realCommand : string
var |
---|
string
command : string
var |
---|
string
os : string
var |
---|
string
escape : boolean
var |
---|
boolean
output : \File
var |
---|
\File
passthru : boolean
var |
---|
boolean
logOutput : boolean
var |
---|
boolean
logLevel : integer
var |
---|
integer
error : \File
var |
---|
\File
spawn : boolean
var |
---|
boolean
returnProperty : string
var |
---|
string
outputProperty : string
var |
---|
string
checkreturn : boolean
var |
---|
boolean
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project