Avolutions\Config\ConfigFileLoader
The ConfigFileLoader class provides the functionality to load config files from a given path and get single values from it.
Properties
Property | Visibility | Type | Description |
---|---|---|---|
$values | protected | array | An array containing all loaded configuration values |
Methods
Method | Visibility | Description |
---|---|---|
get() | public | Returns the value for the given key. The key is separated by slashes (/). |
loadConfigFile() | protected | Loads the given config file and return the content (array) or an empty array if the file can not be found. |
Property Details
$values
An array containing all loaded configuration values
protected array<string|int, mixed> $values = []
Method Details
get()
Returns the value for the given key. The key is separated by slashes (/).
public
get(string $key) : mixed
Parameters
string
$key
The key (slash separated) of the config value.
Return values
mixed Returns the value for the given key. The key is separated by slashes (/).loadConfigFile()
Loads the given config file and return the content (array) or an empty array if the file can not be found.
protected
loadConfigFile(string $configFile) : array<string|int, mixed>
Parameters
string
$configFile
Complete name including the path and file extension of the config file.