Arikaim CMS

Application
in package

Console application

Table of Contents

Constants

LOG_ERROR_MESSAGE  = 'Error command execution.'
LOG_MESSAGE  = 'Command executed.'
LOG_TERMINATE_MESSAGE  = 'Console command terminated.'

Properties

$application  : Application
App object
$dispatcher  : EventDispatcher
Event dispatcher
$logger  : LoggerInterface|null
Logger
$options  : array<string|int, mixed>
Options
$title  : string
Console app title
$version  : string
App version

Methods

__construct()  : mixed
Constructor
addCommands()  : void
Add commands to console app
getDispatcher()  : EventDispatcher
Get event dispatcher
run()  : void
Run console cli
log()  : bool
Log message
logError()  : bool
Log error message

Constants

LOG_ERROR_MESSAGE

public mixed LOG_ERROR_MESSAGE = 'Error command execution.'

LOG_MESSAGE

public mixed LOG_MESSAGE = 'Command executed.'

LOG_TERMINATE_MESSAGE

public mixed LOG_TERMINATE_MESSAGE = 'Console command terminated.'

Properties

$application

App object

protected Application $application

$dispatcher

Event dispatcher

protected EventDispatcher $dispatcher

$logger

Logger

protected LoggerInterface|null $logger = null

$options

Options

protected array<string|int, mixed> $options = []

Methods

__construct()

Constructor

public __construct(string $title[, string $version = '' ][, array<string|int, mixed> $options = [] ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
$title : string
$version : string = ''
$options : array<string|int, mixed> = []
$logger : LoggerInterface|null = null

addCommands()

Add commands to console app

public addCommands(array<string|int, mixed> $commands) : void
Parameters
$commands : array<string|int, mixed>

getDispatcher()

Get event dispatcher

public getDispatcher() : EventDispatcher
Return values
EventDispatcher

log()

Log message

protected log(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$message : string
$context : array<string|int, mixed> = []
Return values
bool

logError()

Log error message

protected logError(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$message : string
$context : array<string|int, mixed> = []
Return values
bool

        
On this page

Search results