Configuration
in package
implements
ConfigurationInterface
Interfaces, Classes and Traits
Table of Contents
- $config : array<string, mixed>
- __construct() : mixed
- exists() : bool
- get() : mixed|null
- Return the configuration value at the given key, or $default if no such config exists
- merge() : void
- Merge an existing array into the current configuration
- replace() : void
- Replace the entire array with something else
- set() : void
- Set the configuration value at the given key
- getConfigByPath() : mixed|null
- setByPath() : void
Properties
$config
private
array<string, mixed>
$config
Methods
__construct()
public
__construct([array<string, mixed> $config = [] ]) : mixed
Parameters
- $config : array<string, mixed> = []
Return values
mixed —exists()
public
exists(string $key) : bool
Parameters
- $key : string
Return values
bool —get()
Return the configuration value at the given key, or $default if no such config exists
public
get([string|null $key = null ][, mixed $default = null ]) : mixed|null
The key can be a string or a slash-delimited path to a nested value
Parameters
- $key : string|null = null
- $default : mixed = null
Return values
mixed|null —merge()
Merge an existing array into the current configuration
public
merge([array<string|int, mixed> $config = [] ]) : void
Parameters
- $config : array<string|int, mixed> = []
Return values
void —replace()
Replace the entire array with something else
public
replace([array<string|int, mixed> $config = [] ]) : void
Parameters
- $config : array<string|int, mixed> = []
Return values
void —set()
Set the configuration value at the given key
public
set(string $key[, mixed $value = null ]) : void
The key can be a string or a slash-delimited path to a nested value
Parameters
- $key : string
- $value : mixed = null
Return values
void —getConfigByPath()
private
getConfigByPath(string $keyPath[, string|null $default = null ]) : mixed|null
Parameters
- $keyPath : string
- $default : string|null = null
Return values
mixed|null —setByPath()
private
setByPath(string $keyPath[, string|null $value = null ]) : void
Parameters
- $keyPath : string
- $value : string|null = null