Executes a command on the shell.
Use {@link 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: f519e4e90fdc87bd40ee563645b5def3e3ff0c0a $ |
| package |
phing.tasks.system |
__construct()
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
isApplicable() : boolean
booleanFalse if the exec command shall not be run
prepare() : void
changes to the specified directory.
buildCommand() : void
| uses |
|---|
executeCommand() : array
arrayarray(return code, array with output)
cleanup(integer $return, array $output) : void
integerReturn code
arrayArray with command output
setCommand(mixed $command) : void
mixedString or string-compatible (e.g. w/ __toString()).
setExecutable(mixed $executable) : void
mixedString or string-compatible (e.g. w/ __toString()).
setEscape(boolean $escape) : void
booleanIf the command shall be escaped or not
setDir(\PhingFile $dir) : void
setOs(string $os) : void
stringOperating system string (e.g. "Linux")
setOutput(\PhingFile $f) : void
setError(\PhingFile $f) : void
setPassthru(boolean $passthru) : void
booleanIf passthru shall be used
setLogoutput(boolean $logOutput) : void
booleanIf output shall be logged visibly
setSpawn(boolean $spawn) : void
booleanIf the command is to be run in the background
setCheckreturn(boolean $checkreturn) : void
booleanIf the return code shall be checked
setReturnProperty(string $prop) : void
stringProperty name
setOutputProperty(string $prop) : void
stringProperty name
setLevel(string $level) : void
stringLog level
createArg() : \CommandlineArgument
setOwningTarget(\Target $target)
getOwningTarget() : \Target
getTaskName() : string
stringName of this task
setTaskName(string $name) : string
string
stringA string representing the name of this task for log
getTaskType() : string
stringThe type of this task (XML Tag)
setTaskType($name)
getRegisterSlot(string $slotName)
string
log(string $msg, integer $level = \Project::MSG_INFO)
stringThe message to be logged.
integerThe message's priority at this message should have
setDescription(string $desc)
stringThe text describing the task
getDescription() : string
stringThe text description of the task
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
| throws |
|---|
getLocation() : \Location
setLocation(\Location $location)
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
maybeConfigure()
perform()
setProject(\Project $project)
getProject() : \Project
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