Свойство | Type | Description | |
---|---|---|---|
$exitCodes | array |
Méthode | 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 ( ) : |
清空 errorOutput | |
clearOutput ( ) : |
清空输出 | |
disableOutput ( ) : |
禁用从底层过程获取输出和错误输出。 | |
enableOutput ( ) : |
开启从底层过程获取输出和错误输出。 | |
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 ) : |
重启进程 | |
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 ) : |
将一个 POSIX 信号发送到进程中 | |
start ( callable | null $callback = null ) | 启动进程并写到 STDIN 输入后返回。 | |
stop ( ) | 终止进程 | |
wait ( callable | null $callback = null ) : integer | 等待要终止的进程 |
Méthode | Description | |
---|---|---|
buildCallback ( callable | null $callback ) : callable | 建立 wait () 使用的回调。 | |
isSigchildEnabled ( ) : boolean | 是否开启 '--enable-sigchild' | |
updateStatus ( boolean $blocking ) | 更新状态 |
Méthode | Description | |
---|---|---|
captureExitCode ( ) | 捕获退出码 | |
close ( ) : integer | 关闭资源 | |
doSignal ( integer $signal, boolean $throwException ) : boolean | 将一个 POSIX 信号发送到进程中。 | |
getDescriptors ( ) : array | 创建所需的 proc_open 的描述符 | |
readPipes ( boolean $blocking, boolean $close ) | 读取pipes | |
requireProcessIsStarted ( string $functionName ) | 确保进程已经开启 | |
requireProcessIsTerminated ( string $functionName ) | 确保进程已经终止 | |
resetProcessData ( ) | 重置数据 | |
validateTimeout ( integer | float | null $timeout ) : float | null | 验证是否超时 |
public __construct ( string $commandline, string | null $cwd = null, array $env = null, string | null $input = null, integer | float | null $timeout = 60, array $options = [] ) | ||
$commandline | string | 指令 |
$cwd | string | null | 工作目录 |
$env | array | 环境变量 |
$input | string | null | 输入 |
$timeout | integer | float | null | 超时时间 |
$options | array | proc_open的选项 |
public clearErrorOutput ( ) : |
||
Résultat |
public disableOutput ( ) : |
||
Résultat |
public getEnhanceSigchildCompatibility ( ) : boolean | ||
Résultat | boolean |
public getEnhanceWindowsCompatibility ( ) : boolean | ||
Résultat | boolean |
public getErrorOutput ( ) : string | ||
Résultat | string |
public getExitCodeText ( ) : null | string | ||
Résultat | null | string |
public getIdleTimeout ( ) : float | null | ||
Résultat | float | null |
public getIncrementalErrorOutput ( ) : string | ||
Résultat | string |
public getIncrementalOutput ( ) : string | ||
Résultat | string |
public getWorkingDirectory ( ) : string | null | ||
Résultat | string | null |
public hasBeenSignaled ( ) : boolean | ||
Résultat | boolean |
public static isPtySupported ( ) : boolean | ||
Résultat | boolean |
protected isSigchildEnabled ( ) : boolean | ||
Résultat | boolean |
public setCommandLine ( string $commandline ) : self | ||
$commandline | string | |
Résultat | self |
public setEnhanceSigchildCompatibility ( boolean $enhance ) : self | ||
$enhance | boolean | |
Résultat | self |
public setEnhanceWindowsCompatibility ( boolean $enhance ) : self | ||
$enhance | boolean | |
Résultat | self |
public setOptions ( array $options ) : self | ||
$options | array | |
Résultat | self |
public setWorkingDirectory ( string $cwd ) : self | ||
$cwd | string | |
Résultat | self |
protected updateStatus ( boolean $blocking ) | ||
$blocking | boolean |