original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Adds a new generator .