class Database implements ExecutionScopedAttribute

Methods

__construct(UnitEnum|string|null $connection = null)

Create a new class instance.

bool
isExecutionScoped()

Determine whether the resolved value belongs to the current execution.

resolve(Database $attribute, Container $container)

Resolve the database connection.

Details

at line 19
__construct(UnitEnum|string|null $connection = null)

Create a new class instance.

Parameters

UnitEnum|string|null $connection

at line 26
bool isExecutionScoped()

Determine whether the resolved value belongs to the current execution.

Return Value

bool

at line 34
static ConnectionInterface resolve(Database $attribute, Container $container)

Resolve the database connection.

Parameters

Database $attribute
Container $container

Return Value

ConnectionInterface