function updateContent($data) { $tpl = new Template($this->content); $this->content = $tpl->apply($data); return $this; }
function renderProperty($propertyName, $data) { $tpl = new Template($this->{$propertyName}); $this->{$propertyName} = $tpl->apply($data); return $this; }
public function render($file, array $data) { $template = new Template(); $template->setVars($data); return $template->render($file); }