Exemple #1
0
 protected function getStringFromOb(TemplateFile $template)
 {
     ob_start();
     $template->render();
     $out = ob_get_contents();
     ob_end_clean();
     return trim($out);
 }
Exemple #2
0
 protected function getTemplateFile()
 {
     if (!$this->templateFile) {
         throw new Mesour\InvalidStateException('Temp dir is required. User setTempDir.');
     }
     if (!$this->file) {
         throw new Mesour\InvalidStateException('Template file is required. User setFile.');
     } else {
         $this->templateFile->setFile($this->file);
     }
     if ($this->block) {
         $this->templateFile->setBlock($this->block);
     }
     return $this->templateFile;
 }