src/Routes/Controller.php
protected function renderInternal(RequestApplicationInterface $app, $viewName, $params = [], $ajax = false, $asResponse = false)
    {
        $view = $app->view;
        $rendered = $ajax ? $view->renderAjax($viewName, $params, $this) : $view->render($viewName, $params, $this);
        if (!$asResponse) {
            return $rendered;
        }
        $app->response->setBody($rendered);
        return $app->response;
    }
protected function renderInternal(RequestApplicationInterface $app, $viewName, $params = [], $ajax = false, $asResponse = false)
    {
        $view = $app->view;
        $rendered = $ajax ? $view->renderAjax($viewName, $params, $this) : $view->render($viewName, $params, $this);
        if (!$asResponse) {
            return $rendered;
        }
        $app->response->setBody($rendered);
        return $app->response;
    }
Render view internal function
@param RequestApplicationInterface $app
@param string                      $viewName
@param array                       $params
@param bool                        $ajax
@param bool                        $asResponse
@return \Reaction\Web\ResponseBuilderInterface|string