public function registerDecorator($configKey, $className)
    {
        if (isset($this->decorators[$configKey])) {
            throw new \RuntimeException('Decorator key already in use: ' . $configKey);
        }
        if (in_array($className, $this->decorators)) {
            throw new \RuntimeException('Decorator class already registered: ' . $className);
        }
        $this->decorators[$configKey] = $className;
    }
public function registerDecorator($configKey, $className)
    {
        if (isset($this->decorators[$configKey])) {
            throw new \RuntimeException('Decorator key already in use: ' . $configKey);
        }
        if (in_array($className, $this->decorators)) {
            throw new \RuntimeException('Decorator class already registered: ' . $className);
        }
        $this->decorators[$configKey] = $className;
    }
public function registerDecorator ( $ configKey , $ className ) { if ( isset ( $ this -> decorators [ $ configKey ] ) ) { throw new \ RuntimeException ( 'Decorator key already in use: ' . $ configKey ) ; } if ( in_array ( $ className , $ this -> decorators ) ) { throw new \ RuntimeException ( 'Decorator class already registered: ' . $ className ) ; } $ this -> decorators [ $ configKey ] = $ className ; }
Register a new decorator class

Class must implement DecoratorInterface

@param string $configKey
@param string $className
Register a new decorator class