$escapeArgs
$escapeArgs : bool
Command
This class represents a shell command.
$escapeArgs : bool
$escapeCommand : bool
$useExec : bool
$captureStdErr : bool
$procCwd : string|null
$procEnv : array|null
$procOptions : array|null
$_command : string
$_args : array
$_execCommand : string
$_stdOut : string
$_stdErr : string
$_exitCode : int
$_error : string
$_executed : bool
setOptions(array $options) : \Command
array | $options | array of name => value options that should be applied to the object You can also pass options that use a setter, e.g. you can pass a 'fileName' option which will be passed to setFileName(). |
for method chaining
setCommand(string $command) : \Command
string | $command | the command or full command string to execute, like 'gzip' or 'gzip -d'. You can still call addArg() to add more arguments to the command. If $escapeCommand was set to true, the command gets escaped through escapeshellcmd(). |
for method chaining
addArg(string $key, string|array|null $value = null, bool|null $escape = null) : \Command
string | $key | the argument key to add e.g. |
string|array|null | $value | the optional argument value which will get escaped if $escapeArgs is true.
An array can be passed to add more than one value for a key, e.g. |
bool|null | $escape | if set, this overrides the $escapeArgs setting and enforces escaping/no escaping |
for method chaining