Свойство | Тип | Описание | |
---|---|---|---|
$cwd | string | Actual working directory. | |
$env | array | Environment properties. | |
$error | string | Stderr output. | |
$out | string | Stdout output. | |
$processList | array | List of running processes. |
Метод | Описание | |
---|---|---|
__construct ( string $cwd = '', array $env = [] ) | Constructor. | |
clearEnv ( ) : |
Removes environment properties. | |
exec ( string $cmd, integer &$status = null ) : |
Executes an external command. | |
getError ( ) : string | Returns stderr contents. | |
getOut ( ) : string | Returns stdout contents. | |
killProcess ( string $name ) : self | Kills all processes of the given name. | |
loadProcessList ( ) : self | Returns a list of processes. | |
processExists ( string $name ) : boolean | Checks if there is a process of the given name. | |
setCwd ( string $cwd = '' ) : |
Sets working directory. | |
setEnv ( array $env ) : |
Adds one or more environment properties. |
public __construct ( string $cwd = '', array $env = [] ) | ||
$cwd | string | Working directory |
$env | array | Array of environment properties |
public clearEnv ( ) : |
||
Результат |
public killProcess ( string $name ) : self | ||
$name | string | Process name |
Результат | self |
public loadProcessList ( ) : self | ||
Результат | self |
public processExists ( string $name ) : boolean | ||
$name | string | Process name |
Результат | boolean |
protected array $processList | ||
Результат | array |