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 48
__construct(LoaderInterface $loader, string|null $environment = null)
Constructor.
at line 60
LoaderInterface
getLoader()
Returns the config loader.
at line 70
array
getLoadedConfiguration()
Returns the currently loaded configuration.
at line 80
setEnvironment(string $environment)
Sets the environment.
at line 91
protected array
parseKey(string $key)
Parses the language key.
at line 101
protected
load(string $file)
Loads the configuration file.
at line 113
mixed
get(string $key, mixed $default = null)
Returns config value or entire config array from a file.
at line 131
set(string $key, mixed $value)
Sets a config value.
at line 149
bool
remove(string $key)
Removes a value from the configuration.