public static function addConfigurationLoader($id, $loader) {
    if (array_key_exists($id, self::$configurationLoaders)) {
      throw new \Exception("there is already a configuration loader for id $id");
    }

    $reflection = new \ReflectionClass($loader);
    if (!$reflection->implementsInterface(ConfigurationLoader::class)) {
      throw new \Exception("given loader must implement the ConfigurationLoader interface");
    }

    self::$configurationLoaders[$id] = $loader;
    ksort(self::$configurationLoaders);
  }