Method |
Description |
|
__clone ( ) |
|
|
__construct ( string $commandline, string | null $cwd = null, array $env = null, string | null $input = null, integer | float | null $timeout = 60, array $options = [] ) |
构造方法 |
|
__destruct ( ) |
|
|
addErrorOutput ( string $line ) |
添加一行错误输出 |
|
addOutput ( string $line ) |
添加一行输出 |
|
checkTimeout ( ) |
是否超时 |
|
clearErrorOutput ( ) : Process |
清空 errorOutput |
|
clearOutput ( ) : Process |
清空输出 |
|
disableOutput ( ) : Process |
禁用从底层过程获取输出和错误输出。 |
|
enableOutput ( ) : Process |
开启从底层过程获取输出和错误输出。 |
|
getCommandLine ( ) : string |
获取被执行的指令 |
|
getEnhanceSigchildCompatibility ( ) : boolean |
返回是否 sigchild 兼容模式激活 |
|
getEnhanceWindowsCompatibility ( ) : boolean |
是否兼容windows |
|
getEnv ( ) : array |
获取环境变量 |
|
getErrorOutput ( ) : string |
返回当前的错误输出的过程 (STDERR)。 |
|
getExitCode ( ) : null | integer |
获取退出码 |
|
getExitCodeText ( ) : null | string |
获取退出文本 |
|
getIdleTimeout ( ) : float | null |
获取idle超时时间 |
|
getIncrementalErrorOutput ( ) : string |
以增量方式返回 errorOutput |
|
getIncrementalOutput ( ) : string |
以增量方式返回的输出结果。 |
|
getInput ( ) : null | string |
获取输入 |
|
getOptions ( ) : array |
获取proc_open的选项 |
|
getOutput ( ) : string |
获取当前的输出管道 |
|
getPid ( ) : integer | null |
获取PID |
|
getStatus ( ) : string |
获取当前的状态 |
|
getStopSignal ( ) : integer |
返回导致子进程停止其执行的数。 |
|
getTermSignal ( ) : integer |
返回导致子进程终止其执行的数。 |
|
getTimeout ( ) : float | null |
获取超时时间 |
|
getWorkingDirectory ( ) : string | null |
获取工作目录 |
|
hasBeenSignaled ( ) : boolean |
是否未捕获的信号已被终止子进程 |
|
hasBeenStopped ( ) : boolean |
检查子进程信号是否已停止 |
|
isOutputDisabled ( ) : boolean |
输出是否禁用 |
|
isPty ( ) : boolean |
是否是pty模式 |
|
isPtySupported ( ) : boolean |
是否支持pty |
|
isRunning ( ) : boolean |
检查是否正在运行 |
|
isStarted ( ) : boolean |
检查是否已开始 |
|
isSuccessful ( ) : boolean |
检查是否成功 |
|
isTerminated ( ) : boolean |
检查是否已终止 |
|
isTty ( ) : boolean |
检查是否是tty模式 |
|
mustRun ( callable | null $callback = null ) : self |
运行指令 |
|
restart ( callable | null $callback = null ) : Process |
重启进程 |
|
run ( callback | null $callback = null ) : integer |
运行指令 |
|
setCommandLine ( string $commandline ) : self |
设置指令 |
|
setEnhanceSigchildCompatibility ( boolean $enhance ) : self |
激活 sigchild 兼容性模式。 |
|
setEnhanceWindowsCompatibility ( boolean $enhance ) : self |
设置是否兼容windows |
|
setEnv ( array $env ) : self |
设置环境变量 |
|
setIdleTimeout ( integer | float | null $timeout ) : self |
设置idle超时时间 |
|
setInput ( mixed $input ) : self |
设置输入 |
|
setOptions ( array $options ) : self |
设置proc_open的选项 |
|
setPty ( boolean $bool ) : self |
设置pty模式 |
|
setTimeout ( integer | float | null $timeout ) : self |
设置超时时间 |
|
setTty ( boolean $tty ) : self |
设置TTY |
|
setWorkingDirectory ( string $cwd ) : self |
设置工作目录 |
|
signal ( integer $signal ) : Process |
将一个 POSIX 信号发送到进程中 |
|
start ( callable | null $callback = null ) |
启动进程并写到 STDIN 输入后返回。 |
|
stop ( ) |
终止进程 |
|
wait ( callable | null $callback = null ) : integer |
等待要终止的进程 |
|