class AbstractApplication implements LoggerAwareInterface (View source)

The Abstract Application Class.

Methods

__construct(Structure $config = null)

Class constructor of Application.

void
close(integer|string $message)

Method to close the application.

mixed
execute()

Execute the application.

mixed
get(string $key, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

LoggerInterface
getLogger()

Get the logger.

mixed
set(string $key, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

setConfiguration(Structure $config)

Sets the configuration for the application.

setLogger(LoggerInterface $logger)

Set the logger.

mixed
__get($name)

is utilized for reading data from inaccessible members.

Details

at line line 48
__construct(Structure $config = null)

Class constructor of Application.

Parameters

Structure $config An optional argument to provide a Structure object to be config.

at line line 64
void close(integer|string $message)

Method to close the application.

Parameters

integer|string $message The exit code (optional; default is 0).

Return Value

void

at line line 86
mixed execute()

Execute the application.

Return Value

mixed

at line line 128
mixed get(string $key, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $key The name of the property.
mixed $default The default value (optional) if none is set.

Return Value

mixed The value of the configuration.

at line line 140
LoggerInterface getLogger()

Get the logger.

Return Value

LoggerInterface

at line line 175
mixed set(string $key, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $key The name of the property.
mixed $value The value of the property to set (optional).

Return Value

mixed Previous value of the property

at line line 193
AbstractApplication setConfiguration(Structure $config)

Sets the configuration for the application.

Parameters

Structure $config A structure object holding the configuration.

Return Value

AbstractApplication Returns itself to support chaining.

at line line 209
AbstractApplication setLogger(LoggerInterface $logger)

Set the logger.

Parameters

LoggerInterface $logger The logger.

Return Value

AbstractApplication Returns itself to support chaining.

at line line 223
mixed __get($name)

is utilized for reading data from inaccessible members.

Parameters

$name string

Return Value

mixed