PHP Class Consolidation\Cgr\CommandToExec

Show file Open project: consolidation/cgr

Protected Properties

Property Type Description
$arguments
$dir
$env
$execPath

Public Methods

Method Description
__construct ( $execPath, $arguments, $env = [], $dir = '' ) Hold some command values to later exec
getCommandString ( ) Generate a single command string.
run ( $stdoutFile = '' ) Run our command. Set up the environment, as needed, ensuring that it is restored at the end of the run.
runCommand ( string $commandString, $stdoutFile = '' ) : integer Run a single command.

Method Details

__construct() public method

Hold some command values to later exec
public __construct ( $execPath, $arguments, $env = [], $dir = '' )

getCommandString() public method

Generate a single command string.
public getCommandString ( )

run() public method

Run our command. Set up the environment, as needed, ensuring that it is restored at the end of the run.
public run ( $stdoutFile = '' )

runCommand() public static method

Run a single command.
public static runCommand ( string $commandString, $stdoutFile = '' ) : integer
$commandString string
return integer

Property Details

$arguments protected property

protected $arguments

$dir protected property

protected $dir

$env protected property

protected $env

$execPath protected property

protected $execPath