public function renderTemplate(Request $request, Response $response, $template, $status = null)
    {
        $response->getBody()->write($this->fetchTemplate($request, $template));

        if ($status) {
            $response = $response->withStatus($status);
        }

        return $response;
    }
public function renderTemplate(Request $request, Response $response, $template, $status = null)
    {
        $response->getBody()->write($this->fetchTemplate($request, $template));

        if ($status) {
            $response = $response->withStatus($status);
        }

        return $response;
    }
public function renderTemplate ( Request $ request , Response $ response , $ template , $ status = null ) { $ response -> getBody ( ) -> write ( $ this -> fetchTemplate ( $ request , $ template ) ) ; if ( $ status ) { $ response = $ response -> withStatus ( $ status ) ; } return $ response ; }
Renders template with previous set data.

@param Request  $request
@param Response $response
@param string   $template The template to render
@param int      $status   [optional] Response status code

@return Response
@throws Exception
Renders template with previous set data .