\NeuronCommandLineApplicationBase

Command line applications are designed to only be executed from the context of the command line.

Allows for easy addition and handling of command line parameters.

Summary

Methods
Properties
Constants
getLogger()
log()
isCommandLine()
__construct()
getVersion()
run()
No public properties found
No constants found
getHandlers()
addHandler()
processParameters()
help()
onStart()
getParameters()
getParameter()
onFinish()
onError()
onRun()
$_aParameters
N/A
No private methods found
$_aHandlers
$_Logger
N/A

Properties

$_aParameters

$_aParameters

$_aHandlers

$_aHandlers

$_Logger

$_Logger

Methods

log()

log(mixed $s, int $iLevel)

Parameters

mixed $s
int $iLevel

Writes to the logger. Defaults to debug mode. Data is only written to the log based on the loggers run-level.

isCommandLine()

isCommandLine() : bool

Returns

bool

__construct()

__construct()

getVersion()

getVersion()

run()

run(array|null $aArgv)

Parameters

array|null $aArgv

getHandlers()

getHandlers()

addHandler()

addHandler(mixed $sSwitch, mixed $sDescription, mixed $method, bool|false $bParam)

Parameters

mixed $sSwitch
mixed $sDescription
mixed $method
bool|false $bParam

processParameters()

processParameters()

help()

help()

onStart()

onStart()

getParameters()

getParameters() : array

Returns

array —

returns all parameters

getParameter()

getParameter(mixed $s) : mixed

Parameters

mixed $s

Returns

mixed

onFinish()

onFinish()

onError()

onError(\Exception $ex) : bool

Parameters

\Exception $ex

Returns

bool

onRun()

onRun()