Documentation

SimpleExecutor
in package

Run a one-off command and capture STDOUT and return code.

Tags
author

Ralf Lang ralf.lang@ralf-lang.de

copyright

2019-2022 Horde LLC

Table of Contents

$logger  : LoggerInterface
__construct()  : mixed
__invoke()  : ExecutionResult
Run the command

Properties

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 = ''
Return values
ExecutionResult

Search results