SimpleSAML_Metadata_MetaDataStorageHandler::__construct PHP Method

__construct() protected method

This constructor initializes this metadata storage handler. It will load and parse the configuration, and initialize the metadata source list.
protected __construct ( )
    protected function __construct()
    {
        $config = SimpleSAML_Configuration::getInstance();
        $sourcesConfig = $config->getArray('metadata.sources', null);
        // for backwards compatibility, and to provide a default configuration
        if ($sourcesConfig === null) {
            $type = $config->getString('metadata.handler', 'flatfile');
            $sourcesConfig = array(array('type' => $type));
        }
        try {
            $this->sources = SimpleSAML_Metadata_MetaDataStorageSource::parseSources($sourcesConfig);
        } catch (Exception $e) {
            throw new Exception("Invalid configuration of the 'metadata.sources' configuration option: " . $e->getMessage());
        }
    }