Exemple #1
0
 public function render($context)
 {
     $template = new Shine($this->template_path);
     if (!is_null($this->template_path)) {
         return $template->render($context);
     } else {
         return '';
     }
 }
Exemple #2
0
 /**
  * @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);
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 public function render($context)
 {
     $template_name = $this->template_name->resolve($context);
     $t = new Shine($template_name);
     return $t->render($context);
 }