public function render($context) { $template = new Shine($this->template_path); if (!is_null($this->template_path)) { return $template->render($context); } else { return ''; } }
/** * @see Shine_Node_Abstract::render() */ public function render($context) { $resolved_vars = array(); foreach ($this->vars_to_resolve as $var) { $resolved_vars[] = $var->resolve($context); } $dict = call_user_func_array($this->func, $resolved_vars); $t = new Shine($this->template); return $t->render($dict); }
public function display($file) { require_once 'Shine.php'; $template_path = ROOT_PATH . '/themes'; $config = array('enableCache' => false, 'defaultContext' => array('foobar' => 'abcd')); Shine::setTemplate($template_path, $config); Shine::addPlugin('customtags'); $shine = new Shine($file); echo $shine->render($this->context); }
public function render($context) { $template_name = $this->template_name->resolve($context); $t = new Shine($template_name); return $t->render($context); }