[core] Add configuration for bridges, allowing private bridges (#1343)

This commit is contained in:
Lyra 2020-12-12 17:05:22 +01:00 committed by GitHub
commit 810a2503c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 6 deletions

View file

@ -145,10 +145,7 @@ final class Configuration {
// Replace default configuration with custom settings
foreach(parse_ini_file(FILE_CONFIG, true, INI_SCANNER_TYPED) as $header => $section) {
foreach($section as $key => $value) {
// Skip unknown sections and keys
if(array_key_exists($header, Configuration::$config) && array_key_exists($key, Configuration::$config[$header])) {
Configuration::$config[$header][$key] = $value;
}
Configuration::$config[$header][$key] = $value;
}
}
}
@ -218,13 +215,11 @@ final class Configuration {
* @return mixed|null The parameter value.
*/
public static function getConfig($section, $key) {
if(array_key_exists($section, self::$config) && array_key_exists($key, self::$config[$section])) {
return self::$config[$section][$key];
}
return null;
}
/**