示例#1
0
 /**
  * Renders a WebTemplate
  *
  * @param TemplateAbstract $template
  *
  * @return void
  */
 protected function handleWebTemplate(TemplateAbstract $template)
 {
     $template->setCacheDir($this->getTempDir() . DIRECTORY_SEPARATOR . 'cache');
     if (isset($this->templateDir)) {
         $template->setProjectTemplateDir($this->templateDir);
     }
     $template->setDev($this->isDev);
     // set the template parameters
     $template->setParameters($this->getTemplateParameters($template));
     // prepare the template render
     $template->init();
     $response = $template->getWebResponse();
     if ($response instanceof WebResponse) {
         $this->handleWebResponse($response);
     }
 }
示例#2
0
 /**
  * Location of the template cache directory
  *
  * @param string $dir absolute location of the template cache directory
  *
  * @return void
  */
 public function setCacheDir($dir)
 {
     $dir .= DIRECTORY_SEPARATOR . 'twig';
     parent::setCacheDir($dir);
 }
示例#3
0
 /**
  * Location of the template cache directory
  *
  * @param string $dir absolute location of the template cache directory
  *
  * @return void
  */
 public function setCacheDir($dir)
 {
     $dir .= DIRECTORY_SEPARATOR . 'smarty';
     Logger::debug("Smarty cache dir set to: " . $dir);
     parent::setCacheDir($dir);
 }