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; }
/** * @param \Dust\Ast\Body $template * @param array $context * * @return string */ public function renderTemplate(Ast\Body $template, $context = []) { return $this->evaluator->evaluate($template, $context); }