src/Brightmarch/RestEasy/Controller/Controller.php
public function renderResource($view, array $parameters=[], $statusCode=200)
    {
        $this->findContentType()
            ->findViewType()
            ->buildViewTemplate($view)
            ->checkViewTemplateExists();

        $response = $this->createResponse($statusCode);
        $response->headers
            ->set('Content-Type', $this->contentType);

        return $this->render($this->viewTemplateName, $parameters, $response);
    }
public function renderResource($view, array $parameters=[], $statusCode=200)
    {
        $this->findContentType()
            ->findViewType()
            ->buildViewTemplate($view)
            ->checkViewTemplateExists();

        $response = $this->createResponse($statusCode);
        $response->headers
            ->set('Content-Type', $this->contentType);

        return $this->render($this->viewTemplateName, $parameters, $response);
    }
public function renderResource ( $ view , array $ parameters = [ ] , $ statusCode = 200 ) { $ this -> findContentType ( ) -> findViewType ( ) -> buildViewTemplate ( $ view ) -> checkViewTemplateExists ( ) ; $ response = $ this -> createResponse ( $ statusCode ) ; $ response -> headers -> set ( 'Content-Type' , $ this -> contentType ) ; return $ this -> render ( $ this -> viewTemplateName , $ parameters , $ response ) ; }
Creates a Response object and returns it.

@param string $view
@param array $parameters
@param integer $statusCode
@return Symfony\Component\HttpFoundation\Response
Creates a Response object and returns it .