protected function getStringFromOb(TemplateFile $template) { ob_start(); $template->render(); $out = ob_get_contents(); ob_end_clean(); return trim($out); }
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; }