src/Service/DependencyService.php
public function add($name, $template)
    {
        if (array_key_exists($name, $this->templates)) {
            throw new \InvalidArgumentException('Template already exists.');
        }

        $this->templates[$name] = $template;
    }
public function add($name, $template)
    {
        if (array_key_exists($name, $this->templates)) {
            throw new \InvalidArgumentException('Template already exists.');
        }

        $this->templates[$name] = $template;
    }
Add a template to the factory

@param string   $name      the name of the Generator
@param string   $template  the template to return for the specified name