Class ShellExec
Description
Wrapper for running shell commands.
Located in /api/ShellExec.class.php (line 53)
Engine | --ShellExec
Class Constant Summary
Variable Summary
mixed
$output
Method Summary
ShellExec
__construct
()
void
__destruct
()
int
Execute
(string $command, string $arguments, [boolean $superuser = false], [array $options = null])
string
GetFirstOutputLine
()
string
GetLastOutputLine
()
array
GetOutput
()
Variables
Methods
Constructor __construct (line 71)
ShellExec constructor.
ShellExec
__construct
()
Redefinition of:
- Engine::__construct()
- Engine constructor.
Execute (line 99)
Executes the command.
Excecute options are:
- escape: scrub command line arguments for naught characters (default true)
- log: specify a log file (default /dev/null)
- env: environment variables (default null)
- background: run command in background (default false)
- stdin: write arguments to stdin (default false)
int
Execute
(string $command, string $arguments, [boolean $superuser = false], [array $options = null])
- string $command: command to excecute
- string $arguments: command arguments
- boolean $superuser: super user flag
- array $options: extra execute options specified above
GetFirstOutputLine (line 189)
Returns first output line.
This method is useful for capturing simple command output (including errors).
string
GetFirstOutputLine
()
GetLastOutputLine (line 205)
Returns last output line.
This method is useful for capturing the last line of output (including errors).
string
GetLastOutputLine
()
GetOutput (line 176)
Returns output from executed command.
array
GetOutput
()
Inherited Methods
Inherited From Engine
Engine::__construct()
Engine::AddValidationError()
Engine::CheckValidationErrors()
Engine::CopyValidationErrors()
Engine::GetValidationErrors()
Engine::Log()
Engine::__destruct()
Class Constants
CMD_SUEXEC
= "/usr/bin/sudo"
(line 61)
Inherited Constants
Inherited from Engine
Engine::COMMAND_API
Documentation generated on Fri, 28 Aug 2009 20:32:18 -0400 by phpDocumentor 1.3.2

