Config
class Config
Config class.
Properties
protected LoaderInterface | $loader | Loader. | |
protected string | $environment | Environment name. | |
protected array | $configuration | Configuration. |
Methods
getLoader()
Returns the config loader.
array
getLoadedConfiguration()
Returns the currently loaded configuration.
setEnvironment(string $environment)
Sets the environment.
array
parseKey(string $key)
Parses the language key.
load(string $file)
Loads the configuration file.
mixed
get(string $key, mixed $default = null)
Returns config value or entire config array from a file.
set(string $key, mixed $value)
Sets a config value.
bool
remove(string $key)
Removes a value from the configuration.
Details
at line 50
__construct(LoaderInterface $loader, string|null $environment = null)
Constructor.
at line 62
LoaderInterface
getLoader()
Returns the config loader.
at line 72
array
getLoadedConfiguration()
Returns the currently loaded configuration.
at line 82
setEnvironment(string $environment)
Sets the environment.
at line 93
protected array
parseKey(string $key)
Parses the language key.
at line 103
protected
load(string $file)
Loads the configuration file.
at line 115
mixed
get(string $key, mixed $default = null)
Returns config value or entire config array from a file.
at line 133
set(string $key, mixed $value)
Sets a config value.
at line 151
bool
remove(string $key)
Removes a value from the configuration.