final class BootContext (View source)

What Kernel::boot() built for this process: the configuration, the logger, the loaded module registry and, once something asks for it, the database.

Methods

__construct(ConfigurationInterface $config, LoggerInterface $logger, ModuleRegistry $moduleRegistry, SessionInterface $session, PDO|null $db = null)

No description

PDO
database()

The process's one database connection, opened from the configured credentials the first time it is asked for.

string|null
backendRefusal()

Why the configured backend may not use this database, or null; checked once per process.

services(ActorInterface $actor)

The per-request service graph over this context, acting as the given actor.

Details

__construct(ConfigurationInterface $config, LoggerInterface $logger, ModuleRegistry $moduleRegistry, SessionInterface $session, PDO|null $db = null)

No description

Parameters

ConfigurationInterface $config
LoggerInterface $logger
ModuleRegistry $moduleRegistry

Already loaded; routes, templates and capabilities come from it

SessionInterface $session

The process's one session, opened by Bootstrap

PDO|null $db

An open connection, or null to open one from the configuration on first use

PDO database()

The process's one database connection, opened from the configured credentials the first time it is asked for.

Return Value

PDO

string|null backendRefusal()

Why the configured backend may not use this database, or null; checked once per process.

The SQL backend refuses a database the API backend has written zone ids to (see BackendModeMarker).

Return Value

string|null

ControllerServiceFactory services(ActorInterface $actor)

The per-request service graph over this context, acting as the given actor.

Parameters

ActorInterface $actor

Return Value

ControllerServiceFactory

Exceptions

RuntimeException