Method | Description | |
---|---|---|
__construct ( $homedir, array $config = [], $localHome = null, array $localConfig = [] ) | ||
get ( string | string[] $keys, string $type = self::CONFIG_ALL, string | integer | float | boolean | array $default = null ) : string | integer | float | boolean | array | Returns a config value. | |
getFirstNotNull ( array $keys, string $type = self::CONFIG_ALL, string | integer | float | boolean | array $default = null ) : string | integer | float | boolean | array | Returns the first none-null configuration value. | |
has ( string $key, string $type = self::CONFIG_ALL ) : boolean | Checks whether the config exists. | |
merge ( array $config, $type ) | Merges new config values with the existing ones (overriding). | |
set ( string $key, string | integer | float | boolean | array $value, string $type ) : |
Merges new config values with the existing ones (overriding). | |
toArray ( string $type = self::CONFIG_ALL ) : array | Get the configuration is as array. |
Method | Description | |
---|---|---|
guardConfigSlot ( string $type ) | Guard the configuration slot is valid. |
public __construct ( $homedir, array $config = [], $localHome = null, array $localConfig = [] ) | ||
$config | array | |
$localConfig | array |
public get ( string | string[] $keys, string $type = self::CONFIG_ALL, string | integer | float | boolean | array $default = null ) : string | integer | float | boolean | array | ||
$keys | string | string[] | Single level key like 'adapters' or array-path like ['adapters', 'github'] |
$type | string | Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL or Config::CONFIG_ALL |
$default | string | integer | float | boolean | array | Default value to use when no config is found (null) |
return | string | integer | float | boolean | array |
public getFirstNotNull ( array $keys, string $type = self::CONFIG_ALL, string | integer | float | boolean | array $default = null ) : string | integer | float | boolean | array | ||
$keys | array | Array of single level keys like "adapters" or property-path "[adapters][github]" to check |
$type | string | Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL or Config::CONFIG_ALL |
$default | string | integer | float | boolean | array | Default value to use when no config is found (null) |
return | string | integer | float | boolean | array |