protected function render(array $params) { $type = key($params); switch ($type) { case 'template': $file = array_shift($params); $template = new self(['file' => $file]); $template->renderContent(); return $template->content(); break; } }