PHP 클래스 Icicle\Concurrent\Process\Process

상속: implements Icicle\Concurrent\ProcessInterface
파일 보기 프로젝트 열기: icicleio/concurrent 1 사용 예제들

공개 메소드들

메소드 설명
__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 ( )