Exemplo n.º 1
0
 public function registerTemplate(TemplateInterface $template)
 {
     $name = $template->getName();
     if ($this->hasTemplate($name)) {
         throw new Exception\TemplateAlreadyRegisteredException(sprintf('Template "%s" is already registered', $name));
     }
     $this->templates[$name] = $template;
 }