public function addGenerator($name, GeneratorInterface $generator)
    {
        if ($this->hasGenerator($name) === true) {
            throw new \RuntimeException(sprintf('A previous generator exists with the same name: "%s".', $name));
        }

        $this->setGenerator($name, $generator);
    }
public function addGenerator($name, GeneratorInterface $generator)
    {
        if ($this->hasGenerator($name) === true) {
            throw new \RuntimeException(sprintf('A previous generator exists with the same name: "%s".', $name));
        }

        $this->setGenerator($name, $generator);
    }
public function addGenerator ( $ name , GeneratorInterface $ generator ) { if ( $ this -> hasGenerator ( $ name ) === true ) { throw new \ RuntimeException ( sprintf ( 'A previous generator exists with the same name: "%s".' , $ name ) ) ; } $ this -> setGenerator ( $ name , $ generator ) ; }
Adds a new generator.

@param string                                                             $name      The generator name
@param \Yosymfony\Spress\Core\ContentManager\Generator\GeneratorInterface $generator

@throws RuntimeException If a previous generator exists with the same name
Adds a new generator .