src/Yggdrasil/Core/Controller/AbstractController.php
protected function render(string $view, array $params = []): Response
    {
        $this->getTemplateEngine()->addGlobal('_request', $this->getRequest());
        $template = $this->getTemplateEngine()->render($view, $params);

        return $this->getResponse()->setContent($template);
    }
protected function render(string $view, array $params = []): Response
    {
        $this->getTemplateEngine()->addGlobal('_request', $this->getRequest());
        $template = $this->getTemplateEngine()->render($view, $params);

        return $this->getResponse()->setContent($template);
    }
protected function render ( string $ view , array $ params = [ ] ) : Response { $ this -> getTemplateEngine ( ) -> addGlobal ( '_request' , $ this -> getRequest ( ) ) ; $ template = $ this -> getTemplateEngine ( ) -> render ( $ view , $ params ) ; return $ this -> getResponse ( ) -> setContent ( $ template ) ; }
Renders given view as response

@param string $view    Name of view file
@param array  $params  Parameters supposed to be passed to the view
@return Response
Renders given view as response