PHP Class Webmozart\Console\Process\ProcessLauncher

This class is used to execute "man" and "less".
Since: 1.0
Author: Bernhard Schussek ([email protected])
Show file Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
isRunning ( ) : boolean Returns whether the launcher is currently running.
isSupported ( ) : boolean Returns whether the launcher is supported on the current system.
launchProcess ( string $command, array $arguments = [], boolean $killable = true ) : integer Launches a process in the foreground.
setCheckInterval ( float $checkInterval ) Returns the interval used to check whether the process is still alive.

Private Methods

Method Description
installSignalHandlers ( $terminable = true )
restoreSignalHandlers ( $terminable = true )
run ( $command, array $arguments )

Method Details

isRunning() public method

Returns whether the launcher is currently running.
public isRunning ( ) : boolean
return boolean Whether the launcher is running.

isSupported() public method

Returns whether the launcher is supported on the current system.
public isSupported ( ) : boolean
return boolean Whether the launcher is supported on the current system.

launchProcess() public method

Launches a process in the foreground.
public launchProcess ( string $command, array $arguments = [], boolean $killable = true ) : integer
$command string The command to execute.
$arguments array Arguments to be quoted and inserted into the command. Each key "key" in the array should correspond to a placeholder "%key%" in the command.
$killable boolean Whether the process can be killed by the user.
return integer The exit status of the process.

setCheckInterval() public method

By default, the interval is 1 second.
public setCheckInterval ( float $checkInterval )
$checkInterval float The check interval.