protected function renderTemplateFile() { if (null !== $this->data) { foreach ($this->data as $key => $value) { ${$key} = $value; } } ob_start(); include $this->templateFile; $this->output = ob_get_clean(); }