SimpleExecutor
in package
Run a one-off command and capture STDOUT and return code.
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 = ''