PHP Class VersionPress\Utils\Process

Inheritance: extends Symfony\Component\Process\Process
Afficher le fichier Open project: versionpress/versionpress Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $commandline, $cwd = null, array $env = null, $input = null, $timeout = 3600, array $options = [] )
addErrorOutput ( $line )
addOutput ( $line )
getConsoleOutput ( ) : string Returns output as it would appear in the console and doesn't care whether it comes from STDOUT or STDERR (or both).
start ( $callback = null )

Method Details

__construct() public méthode

public __construct ( $commandline, $cwd = null, array $env = null, $input = null, $timeout = 3600, array $options = [] )
$env array
$options array

addErrorOutput() public méthode

public addErrorOutput ( $line )

addOutput() public méthode

public addOutput ( $line )

getConsoleOutput() public méthode

This is useful in client code that just wants to show the user whatever the command printed. The programs will sometimes use STDOUT, sometimes STDERR, sometimes mistakenly STDOUT instead of STDERR etc. but it often doesn't matter, we just want to pass the output on to the user.
public getConsoleOutput ( ) : string
Résultat string

start() public méthode

public start ( $callback = null )