class Application

Console application

Constants

LOG_MESSAGE

LOG_ERROR_MESSAGE

LOG_TERMINATE_MESSAGE

Properties

protected Application $application App object
protected string $title Console app title
protected string $version App version
protected EventDispatcher $dispatcher Event dispatcher
protected LoggerInterface|null $logger Logger
protected array $options Options

Methods

__construct(string $title, string $version = '', array $options = [], $logger = null)

Constructor

bool
log(string $message, array $context = [])

Log message

bool
logError(string $message, array $context = [])

Log error message

EventDispatcher
getDispatcher()

Get event dispatcher

void
run()

Run console cli

void
addCommands(array $commands)

Add commands to console app

Details

at line 82
__construct(string $title, string $version = '', array $options = [], $logger = null)

Constructor

Parameters

string $title
string $version
array $options
$logger

at line 146
protected bool log(string $message, array $context = [])

Log message

Parameters

string $message
array $context

Return Value

bool

at line 162
protected bool logError(string $message, array $context = [])

Log error message

Parameters

string $message
array $context

Return Value

bool

at line 176
EventDispatcher getDispatcher()

Get event dispatcher

Return Value

EventDispatcher

at line 186
void run()

Run console cli

Return Value

void

at line 197
void addCommands(array $commands)

Add commands to console app

Parameters

array $commands

Return Value

void