response = $response; $this->template = $template; } /** * @param array $templateData */ protected function render(string $templatePath, array $templateData = []): void { $this->response->addHTML($this->template->render($templatePath, $templateData)); } /** * @param string[] $files */ protected function addScriptFiles(array $files): void { $header = $this->response->getHeader(); $scripts = $header->getScripts(); $scripts->addFiles($files); } }