class ConnectionConfigResolver

internal  
 

Resolves the configuration facts of the booted application's database connections.

The facts are deterministic: every record a connection can select is read, never the random selection a running pool makes.

Traits

Constants

private FETCH_OPTIONS

The PDO options that change the values a query fetches.

Properties

protected Container|null $container from  HasContainer

Methods

void
setContainer(Container $container)

Set the container used for resolution.

getContainer()

Return the current container.

mixed
resolve(string $abstract)

Resolve the given type from the container.

array
parseSearchPath(string|array|null $searchPath)

Parse the Postgres "search_path" configuration value into an array.

connection(string $name)

Get the facts of a connection name, or null when its configuration cannot be resolved.

string|null
getDefaultConnectionName()

Get the name of the default connection.

array
getConnectionNames()

Get the names of the configured connections.

array
getConfiguredName(string $key)

Get whether a config key holding a connection name is present, and its value when it is a string or null, or false for any other value.

array
getConfiguredNames()

Get each config key read as a connection name, with its state.

array
getConsumedKeys()

Get the config keys read so far.

array
getSchemaConfiguration()

Get the normalized configuration that schema aggregation reads.

Details

in HasContainer at line 19
void setContainer(Container $container)

Set the container used for resolution.

Parameters

Container $container

Return Value

void

in HasContainer at line 27
Container getContainer()

Return the current container.

Return Value

Container

in HasContainer at line 35
mixed resolve(string $abstract)

Resolve the given type from the container.

Parameters

string $abstract

Return Value

mixed

in ParsesSearchPath at line 12
protected array parseSearchPath(string|array|null $searchPath)

Parse the Postgres "search_path" configuration value into an array.

Parameters

string|array|null $searchPath

Return Value

array

at line 65
ConnectionConfig|null connection(string $name)

Get the facts of a connection name, or null when its configuration cannot be resolved.

Parameters

string $name

Return Value

ConnectionConfig|null

at line 77
string|null getDefaultConnectionName()

Get the name of the default connection.

Return Value

string|null

at line 89
array getConnectionNames()

Get the names of the configured connections.

Return Value

array

at line 102
array getConfiguredName(string $key)

Get whether a config key holding a connection name is present, and its value when it is a string or null, or false for any other value.

Parameters

string $key

Return Value

array

at line 117
array getConfiguredNames()

Get each config key read as a connection name, with its state.

Return Value

array

at line 127
array getConsumedKeys()

Get the config keys read so far.

Return Value

array

at line 139
array getSchemaConfiguration()

Get the normalized configuration that schema aggregation reads.

Fetch options and custom resolvers only affect lookups, so changing them keeps the aggregated schema.

Return Value

array