processed) { $this->process($_template); } return $_template->getRenderedTemplateCode($this->unifunc); } /** * Write compiled code by handler * * @param Smarty_Internal_Template $_template template object * @param string $code compiled code * * @return boolean success */ public function write(Smarty_Internal_Template $_template, $code) { if (!$_template->source->recompiled) { $obj = new Smarty_Internal_Write_File(); if ($obj->writeFile($this->filepath, $code, $_template->smarty) === true) { $this->timestamp = $this->exists = is_file($this->filepath); if ($this->exists) { $this->timestamp = filemtime($this->filepath); return true; } } return false; } else { $this->buffer = $code; } $this->timestamp = time(); $this->exists = true; return true; } /** * Read compiled content from handler * * @param Smarty_Internal_Template $_template template object * * @return string content */ public function read(Smarty_Internal_Template $_template) { if (!$_template->source->recompiled) { return file_get_contents($this->filepath); } return isset($this->content) ? $this->content : false; } /** * Get compiled time stamp * * @return int */ public function getTimeStamp() { if ($this->exists && !isset($this->timestamp)) { $this->timestamp = @filemtime($this->filepath); } return $this->timestamp; } }