class LoadConfiguration

Properties

static protected null|Application): array<array-key, mixed> $alwaysUseConfig

The closure that resolves the permanent, static configuration if applicable.

Methods

void
bootstrap(Application $app)

Bootstrap the given application while preserving its configuration repository.

void
loadConfigurationFiles(Application $app, Repository $repository)

Load the configuration items from all of the files.

array
loadConfigurationFile(Repository $repository, string $name, string $path, array $base)

Load the given configuration file.

array
mergeableOptions(string $name)

Get configuration arrays whose entries should be merged by name.

array
getConfigurationFiles(Application $app)

Get all of the configuration files for the application.

string
getNestedDirectory(SplFileInfo $file, string $configPath)

Get the configuration file nesting path.

array
getBaseConfiguration()

Get the base configuration files.

static void
alwaysUse(Closure|null $alwaysUseConfig)

Set a callback to return the permanent, static configuration values.

static void
flushState()

Flush all static state.

Details

at line 33
void bootstrap(Application $app)

Bootstrap the given application while preserving its configuration repository.

Reloads are evaluated against a temporary repository so a failed rebuild can restore the previous binding. Successful rebuilds copy their contents into the existing repository before boot-mutation tracking is attached.

Parameters

Application $app

Return Value

void

at line 103
protected void loadConfigurationFiles(Application $app, Repository $repository)

Load the configuration items from all of the files.

Parameters

Application $app
Repository $repository

Return Value

void

at line 129
protected array loadConfigurationFile(Repository $repository, string $name, string $path, array $base)

Load the given configuration file.

Parameters

Repository $repository
string $name
string $path
array $base

Return Value

array

at line 159
protected array mergeableOptions(string $name)

Get configuration arrays whose entries should be merged by name.

For example, an application Redis connection replaces the framework Redis connection, while framework connections not defined by the application remain. Nested arrays not listed here are replaced completely.

Parameters

string $name

Return Value

array

at line 178
protected array getConfigurationFiles(Application $app)

Get all of the configuration files for the application.

Parameters

Application $app

Return Value

array

at line 202
protected string getNestedDirectory(SplFileInfo $file, string $configPath)

Get the configuration file nesting path.

Parameters

SplFileInfo $file
string $configPath

Return Value

string

at line 218
protected array getBaseConfiguration()

Get the base configuration files.

Return Value

array

at line 238
static void alwaysUse(Closure|null $alwaysUseConfig)

Set a callback to return the permanent, static configuration values.

Boot-only. The callback persists in a static property used during the LoadConfiguration bootstrapper; runtime use has no effect on already- loaded config.

Parameters

Closure|null $alwaysUseConfig

Return Value

void

at line 246
static void flushState()

Flush all static state.

Return Value

void