protected function loadDomainConfiguration(array $config)
    {
        try {
            foreach ($config['domains'] as $domain => $options) {
                $domain = new DomainConfiguration();
                $domain->load($options);
                $this->addDomain($domain);
            }
        } catch (ConfigurationException $e) {
            throw new ConfigurationException(sprintf("Error in domain config section: %s", $e->getMessage()));
        }
    }