Properties

$defaultLoggerName

$defaultLoggerName : string

Type

string — the name of the default logger to be used when logging an unhandled exception

$request

$request : \Psr\Http\Message\RequestInterface

Type

\Psr\Http\Message\RequestInterface — the request sent to the framework

$emitter

$emitter : \Zend\Diactoros\Response\EmitterInterface

Type

\Zend\Diactoros\Response\EmitterInterface — the response emitter

$response

$response : \Psr\Http\Message\ResponseInterface

Type

\Psr\Http\Message\ResponseInterface — the response to be emitted

Methods

getDatabaseManager()

getDatabaseManager() : \Gishiki\Database\DatabaseManager

Get the collection of opened database handlers within the current application.

Returns

\Gishiki\Database\DatabaseManager

the collection of database handlers

connectDatabase()

connectDatabase(array  $connections) 

Prepare connections to databases.

Parameters

array $connections

the array of connections

Throws

\Gishiki\Database\DatabaseException

error while connecting the database

getLoggerManager()

getLoggerManager() : \Gishiki\Logging\LoggerManager

Get the PSR-3 loggers manager used within the current application.

Returns

\Gishiki\Logging\LoggerManager

the collection of loggers

setDefaultLoggerName()

setDefaultLoggerName(string  $name) 

Set the name of the default logger.

Parameters

string $name

the name of the default connection

getDefaultLoggerName()

getDefaultLoggerName() : string

Get the name of the default logger.

Returns

string —

the name of the default logger

__construct()

__construct(\Zend\Diactoros\Response\EmitterInterface|null  $emitter = null, string|array|null  $settings = null) 

Begins an application lifecycle.

Initialize the Gishiki engine, prepare for the execution of a framework instance and result emitter.

The suggester emitter is Zend\Diactoros\Response\SapiEmitter;

Parameters

\Zend\Diactoros\Response\EmitterInterface|null $emitter

the emitter to be used when producing output

string|array|null $settings

the path of the settings file

Throws

\Gishiki\Core\Exception

the error preventing configuration to be load

getCurrentDirectory()

getCurrentDirectory() : string

Get the current working directory

Returns

string —

the current directory

getConfiguration()

getConfiguration() : \Gishiki\Core\Configuration

Get the application configuration.

Returns

\Gishiki\Core\Configuration

the configuration

run()

run(  $router) 

Execute the requested operation.

Parameters

$router

Router the router configured

emit()

emit() 

Emit the response generated by calling the run() function.

Throws

\RuntimeException

the response is not valid

initializeDatabaseHandler()

initializeDatabaseHandler() 

Initialize the application internal database handler

isInitializedDatabaseHandler()

isInitializedDatabaseHandler() : boolean

Check if the database handler has been initialized.

Returns

boolean —

true if the database handler is initialized

initializeLoggerHandler()

initializeLoggerHandler() 

Initialize the application internal logger handler

isInitializedLoggerHandler()

isInitializedLoggerHandler() : boolean

Check if the logger handler has been initialized.

Returns

boolean —

true if the logger handler is initialized

connectLogger()

connectLogger(array  $connections, string  $default) 

Prepare every logger instance setting the default one.

If the default logger name is given it will be set as the default one.

Parameters

array $connections

the array of connections

string $default

the name of the default connection

applyConfiguration()

applyConfiguration() 

Apply the application configuration.