PHP Класс Icicle\Concurrent\Process\Process

Наследование: implements Icicle\Concurrent\ProcessInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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 ( )

Приватные методы

Метод Описание
close ( resource $resource ) Closes the stream resource provided, the open process handle, and stdin.

Описание методов

__clone() публичный метод

Resets process values.
public __clone ( )

__construct() публичный метод

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() публичный метод

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

getCommand() публичный метод

Returns the command to execute.
public getCommand ( ) : string
Результат string The command to execute.

getEnv() публичный метод

Gets the environment variables array.
public getEnv ( ) : array
Результат array Array of environment variables.

getOptions() публичный метод

Gets the options to pass to proc_open().
public getOptions ( ) : array
Результат array Array of options.

getPid() публичный метод

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
Результат integer

getStdErr() публичный метод

Gets the process error stream (STDERR).
public getStdErr ( ) : ReadableStream
Результат ReadableStream

getStdIn() публичный метод

Gets the process input stream (STDIN).
public getStdIn ( ) : WritableStream
Результат WritableStream

getStdOut() публичный метод

Gets the process output stream (STDOUT).
public getStdOut ( ) : ReadableStream
Результат ReadableStream

getWorkingDirectory() публичный метод

Gets the current working directory.
public getWorkingDirectory ( ) : string
Результат string The current working directory or null if inherited from the current PHP process.

isRunning() публичный метод

Determines if the process is still running.
public isRunning ( ) : boolean
Результат boolean

join() публичный метод

public join ( ) : Generator
Результат Generator

kill() публичный метод

public kill ( )

signal() публичный метод

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

start() публичный метод

public start ( )