PHP Class Icicle\Concurrent\Process\Process

Inheritance: implements Icicle\Concurrent\ProcessInterface
Afficher le fichier Open project: icicleio/concurrent Class Usage Examples

Méthodes publiques

Méthode 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 ( )

Private Methods

Méthode Description
close ( resource $resource ) Closes the stream resource provided, the open process handle, and stdin.

Method Details

__clone() public méthode

Resets process values.
public __clone ( )

__construct() public méthode

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().

__destruct() public méthode

Stops the process if it is still running.
public __destruct ( )

getCommand() public méthode

Returns the command to execute.
public getCommand ( ) : string
Résultat string The command to execute.

getEnv() public méthode

Gets the environment variables array.
public getEnv ( ) : array
Résultat array Array of environment variables.

getOptions() public méthode

Gets the options to pass to proc_open().
public getOptions ( ) : array
Résultat array Array of options.

getPid() public méthode

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.
public getPid ( ) : integer
Résultat integer

getStdErr() public méthode

Gets the process error stream (STDERR).
public getStdErr ( ) : ReadableStream
Résultat ReadableStream

getStdIn() public méthode

Gets the process input stream (STDIN).
public getStdIn ( ) : WritableStream
Résultat WritableStream

getStdOut() public méthode

Gets the process output stream (STDOUT).
public getStdOut ( ) : ReadableStream
Résultat ReadableStream

getWorkingDirectory() public méthode

Gets the current working directory.
public getWorkingDirectory ( ) : string
Résultat string The current working directory or null if inherited from the current PHP process.

isRunning() public méthode

Determines if the process is still running.
public isRunning ( ) : boolean
Résultat boolean

join() public méthode

public join ( ) : Generator
Résultat Generator

kill() public méthode

public kill ( )

signal() public méthode

Sends the given signal to the process.
public signal ( integer $signo )
$signo integer Signal number to send to process.

start() public méthode

public start ( )