Ejemplo n.º 1
0
 public function render(Ast\Body $ast, Context $context)
 {
     $text = $this;
     if ($ast != NULL) {
         $text = $this->evaluator->evaluateBody($ast, $context, $this);
         if ($this->tapStack != NULL) {
             foreach ($this->tapStack as $value) {
                 $text->out = $value($text->out);
             }
         }
     }
     return $text;
 }
Ejemplo n.º 2
0
 /**
  * @param \Dust\Ast\Body $template
  * @param array          $context
  *
  * @return string
  */
 public function renderTemplate(Ast\Body $template, $context = [])
 {
     return $this->evaluator->evaluate($template, $context);
 }