Method | Description | |
---|---|---|
__clone ( ) | Resets process values. | |
__construct ( string $command, string $cwd = '', array $env = [], array $options = [] ) | ||
__destruct ( ) | Stops the process if it is still running. | |
getCommand ( ) : string | Returns the command to execute. | |
getEnv ( ) : array | Gets the environment variables array. | |
getOptions ( ) : array | Gets the options to pass to proc_open(). | |
getPid ( ) : integer | Returns the PID of the child process. Value is only meaningful if the process has been started and PHP was not compiled with --enable-sigchild. | |
getStdErr ( ) : ReadableStream | Gets the process error stream (STDERR). | |
getStdIn ( ) : WritableStream | Gets the process input stream (STDIN). | |
getStdOut ( ) : ReadableStream | Gets the process output stream (STDOUT). | |
getWorkingDirectory ( ) : string | Gets the current working directory. | |
isRunning ( ) : boolean | Determines if the process is still running. | |
join ( ) : Generator | ||
kill ( ) | ||
signal ( integer $signo ) | Sends the given signal to the process. | |
start ( ) |
Method | Description | |
---|---|---|
close ( resource $resource ) | Closes the stream resource provided, the open process handle, and stdin. |
public __construct ( string $command, string $cwd = '', array $env = [], array $options = [] ) | ||
$command | string | Command to run. |
$cwd | string | Working directory or use an empty string to use the working directory of the current PHP process. |
$env | array | Environment variables or use an empty array to inherit from the current PHP process. |
$options | array | Options for proc_open(). |
public getCommand ( ) : string | ||
return | string | The command to execute. |
public getOptions ( ) : array | ||
return | array | Array of options. |
public getStdErr ( ) : ReadableStream | ||
return | ReadableStream |
public getStdIn ( ) : WritableStream | ||
return | WritableStream |
public getStdOut ( ) : ReadableStream | ||
return | ReadableStream |
public getWorkingDirectory ( ) : string | ||
return | string | The current working directory or null if inherited from the current PHP process. |