PHP Class Symfony\Component\Process\PhpProcess

Inheritance: extends Process
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $script, string $cwd = null, array $env = [], integer $timeout = 60, array $options = [] ) Constructor.
getPhpBinary ( ) : string Returns the PHP binary path.
run ( Closure | string | array $callback = null ) : integer run the process.
setPhpBinary ( $php ) Sets the path to the PHP binary to use.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $script, string $cwd = null, array $env = [], integer $timeout = 60, array $options = [] )
$script string The PHP script to run (as a string)
$cwd string The working directory
$env array The environment variables
$timeout integer The timeout in seconds
$options array An array of options for proc_open

getPhpBinary() public static méthode

Returns the PHP binary path.
public static getPhpBinary ( ) : string
Résultat string The PHP binary path

run() public méthode

run the process.
public run ( Closure | string | array $callback = null ) : integer
$callback Closure | string | array A PHP callback to run whenever there is some output available on STDOUT or STDERR
Résultat integer The exit status code

setPhpBinary() public méthode

Sets the path to the PHP binary to use.
public setPhpBinary ( $php )