Example #1
0
 /**
  * Set a new template theme.
  * @param string $name 
  */
 public function setTemplate($name)
 {
     if ($name == $this->template) {
         return false;
     }
     if (!file_exists(Core\Context::getTemplateFilePath($name))) {
         throw new Core\Exception('Template not found in [' . Core\Context::getTemplateFilePath($name) . ']', E_USER_WARNING, $this->name);
     }
     $this->template = $name;
     if ($this->tpl != null) {
         $this->tpl->addTemplateDir(Core\Context::getTemplatePath($this->template));
     }
 }