class LoadConfiguration extends LoadConfiguration

internal  
 

Properties

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

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

from  LoadConfiguration

Methods

void
bootstrap(Application $app)

Bootstrap the given application.

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.

static string
frameworkConfigPath()

Get the framework configuration directory.

static string
frameworkConfigStubPath()

Get the directory of the templates config:publish uses in place of framework configuration files when the framework configuration is merged.

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.

string
resolveConfigurationFile(string $path, string $key)

Resolve the configuration file.

extendsLoadedConfiguration(Collection $configurations)

Extend the loaded configuration.

void
configureDefaultDatabaseConnection(Repository $repository)

Configure the default database connection.

void
rewriteQueueDatabaseConnection(Repository $repository, string $key)

Rewrite queue database settings when testbench swaps the default DB connection.

Details

at line 22
void bootstrap(Application $app)

Bootstrap the given application.

Parameters

Application $app

Return Value

void

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

Load the configuration items from all of the files.

Parameters

Application $app
Repository $repository

Return Value

void

in LoadConfiguration at line 138
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

in LoadConfiguration at line 168
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

in LoadConfiguration at line 188
protected array getConfigurationFiles(Application $app)

Get all of the configuration files for the application.

Parameters

Application $app

Return Value

array

in LoadConfiguration at line 212
protected string getNestedDirectory(SplFileInfo $file, string $configPath)

Get the configuration file nesting path.

Parameters

SplFileInfo $file
string $configPath

Return Value

string

in LoadConfiguration at line 226
static string frameworkConfigPath()

Get the framework configuration directory.

Return Value

string

in LoadConfiguration at line 241
static string frameworkConfigStubPath()

Get the directory of the templates config:publish uses in place of framework configuration files when the framework configuration is merged.

Return Value

string

in LoadConfiguration at line 251
protected array getBaseConfiguration()

Get the base configuration files.

Return Value

array

in LoadConfiguration at line 271
static void alwaysUse(Closure|null $alwaysUseConfig)

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

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

in LoadConfiguration at line 280
static void flushState()

Flush all static state.

Return Value

void

at line 76
protected string resolveConfigurationFile(string $path, string $key)

Resolve the configuration file.

Parameters

string $path
string $key

Return Value

string

at line 87
protected Collection extendsLoadedConfiguration(Collection $configurations)

Extend the loaded configuration.

Parameters

Collection $configurations

Return Value

Collection

at line 95
protected void configureDefaultDatabaseConnection(Repository $repository)

Configure the default database connection.

Parameters

Repository $repository

Return Value

void

at line 112
protected void rewriteQueueDatabaseConnection(Repository $repository, string $key)

Rewrite queue database settings when testbench swaps the default DB connection.

Parameters

Repository $repository
string $key

Return Value

void