public function addConfiguration(ConfigurationInterface $configuration)
    {
        // Clear the parent map.
        $this->parentMap = null;

        $id = $configuration->getResourceId();

        if (array_key_exists($id, $this->configurations)) {
            throw new \RuntimeException(sprintf("Configuration for resource '%s' is already registered.", $id));
        }

        $this->configurations[$id] = $configuration;
    }
public function addConfiguration(ConfigurationInterface $configuration)
    {
        // Clear the parent map.
        $this->parentMap = null;

        $id = $configuration->getResourceId();

        if (array_key_exists($id, $this->configurations)) {
            throw new \RuntimeException(sprintf("Configuration for resource '%s' is already registered.", $id));
        }

        $this->configurations[$id] = $configuration;
    }
public function addConfiguration ( ConfigurationInterface $ configuration ) { // Clear the parent map. $ this -> parentMap = null ; $ id = $ configuration -> getResourceId ( ) ; if ( array_key_exists ( $ id , $ this -> configurations ) ) { throw new \ RuntimeException ( sprintf ( "Configuration for resource '%s' is already registered." , $ id ) ) ; } $ this -> configurations [ $ id ] = $ configuration ; }
Adds the resource configuration.

@param ConfigurationInterface $configuration

@throws \RuntimeException
Adds the resource configuration .