Executor
in package
Run a command in shell context
TODO: Figure where we can put this for reuse without creating an ever-growing blob
Tags
Table of Contents
- $logger : LoggerInterface
- __construct() : mixed
- __invoke() : ExecutionResult
- Run the command
Properties
$logger
private
LoggerInterface
$logger
= new NullLogger()
Methods
__construct()
public
__construct([LoggerInterface $logger = new NullLogger() ]) : mixed
Parameters
- $logger : LoggerInterface = new NullLogger()
Return values
mixed —__invoke()
Run the command
public
__invoke(non-empty-string $cmd[, string $throwOnNonZero = '' ]) : ExecutionResult
Parameters
- $cmd : non-empty-string
-
The complete command to run including all parameters
- $throwOnNonZero : string = ''