WP_CLI

Process::create()public staticWP-CLI 1.0

Method of the class: Process{}

No Hooks.

Return

Process.

Usage

$result = Process::create( $command, $cwd, $env );
$command(string) (required)
Command to execute.
$cwd(string)
Directory to execute the command in.
Default: null
$env(array)
Environment variables to set when running the command.
Default: []

Process::create() code WP-CLI 2.8.0-alpha

public static function create( $command, $cwd = null, $env = [] ) {
	$proc = new self();

	$proc->command = $command;
	$proc->cwd     = $cwd;
	$proc->env     = $env;

	return $proc;
}