/** * Processes a template and returns the output. * * @param string $name The template to process. * @return string The output. */ public function render($name) { $name = isset($this->_twig->custom_path) ? $this->_twig->custom_path . '/' . $name : $name ; $template = $this->_twig->loadTemplate($name); if(!is_array($this->_data)) $this->_data = array(); return $template->render($this->_data); }
/** * Use PHPTAL to generate some XHTML * @return string */ public function execute() { $template = $this->twig->loadTemplate($this->template); return $template->render($this->model); }