com\setasign\SetaFramework\Bootstrap

Bootstrap

File: /SetaFramework/src/Bootstrap/Bootstrap.php

Class hierarchy

Summary

Constants

EVENT_SHUTDOWN_HANDLER

public const Bootstrap::EVENT_SHUTDOWN_HANDLER = 'bootstrap.shutdown_handler'

Will be called after script execution finishes or exit() is called.

Note: HttpBootstrap and Bootstrap share the same shutdown-event.

Show also shutdown functions.

extraParams:
'bootstrap' => Bootstrap


Properties

$debug

protected bool Bootstrap::$debug = false

$defaultDomain

$initialized

protected bool Bootstrap::$initialized = false

Static Methods

prepare()

public static Bootstrap::prepare (
string $configFile,
array $configParams = array ( )
): Bootstrap

Helper method if you want to call the bootstrap manually.

Parameters
$configFile : string
 
$configParams : array
 
Exceptions

Throws ConfigReaderException

registerShutdownFunction()

WARNING: This method is marked as deprecated!

Use eventManager Bootstrap::EVENT_SHUTDOWN_HANDLER directly.

public static Bootstrap::registerShutdownFunction (
callable $function
): void

You should always use this method instead of "register_shutdown_function" to prevent memory leaks in application server structure.

Parameters
$function : callable
 

Methods

__construct()

final public Bootstrap::__construct (
string $configFile,
array $configParams = array ( )
)
Parameters
$configFile : string
 
$configParams : array
 
Exceptions

Throws ConfigReaderException

__wakeup()

public Bootstrap::__wakeup (
void
): void

configureDi()

protected Bootstrap::configureDi (
void
): void

getDefaultDomain()

public Bootstrap::getDefaultDomain (
void
): ?string

getDi()

Returns the Di

If no Di is set, the global di will be used

isDebug()

public Bootstrap::isDebug (
void
): bool

Returns whether uncatched exceptions will be shown

resetState()

public Bootstrap::resetState (
void
): void

setBootstrapLogConfig()

setCacheHandlerConfig()

setDatabaseConnectionConfig()

setDebug()

public Bootstrap::setDebug (
bool $debug
): void
Parameters
$debug : bool
 

setDefaultDomain()

public Bootstrap::setDefaultDomain (
?string $domain
): void
Parameters
$domain : ?string
 

setLogHandlerConfig()

setupCacheBuilder()

setupDatabaseConnectionManager()

setupErrorHandler()

final protected Bootstrap::setupErrorHandler (
void
): ErrorHandler
Exceptions

Throws \Throwable

setupLogBuilder()

setupLogHandler()

shutdownFunction()

protected Bootstrap::shutdownFunction (
void
): void