public static function getOptionalConfig($filename = 'config.php', $configSet = 'simplesaml')
{
assert('is_string($filename)');
assert('is_string($configSet)');
if (!array_key_exists($configSet, self::$configDirs)) {
if ($configSet !== 'simplesaml') {
throw new Exception('Configuration set \'' . $configSet . '\' not initialized.');
} else {
self::$configDirs['simplesaml'] = SimpleSAML\Utils\Config::getConfigDir();
}
}
$dir = self::$configDirs[$configSet];
$filePath = $dir . '/' . $filename;
return self::loadFromFile($filePath, false);
}