src/Graviton/RestBundle/Controller/RestController.php
public function getAction(Request $request, $id)
    {
        $document = $this->getModel()->getSerialised($id, $request);

        $response = $this->getResponse()
            ->setStatusCode(Response::HTTP_OK)
            ->setContent($document);

        return $response;
    }
public function getAction(Request $request, $id)
    {
        $document = $this->getModel()->getSerialised($id, $request);

        $response = $this->getResponse()
            ->setStatusCode(Response::HTTP_OK)
            ->setContent($document);

        return $response;
    }
public function getAction ( Request $ request , $ id ) { $ document = $ this -> getModel ( ) -> getSerialised ( $ id , $ request ) ; $ response = $ this -> getResponse ( ) -> setStatusCode ( Response :: HTTP_OK ) -> setContent ( $ document ) ; return $ response ; }
Returns a single record

@param Request $request Current http request
@param string  $id      ID of record

@return \Symfony\Component\HttpFoundation\Response $response Response with result or error
Returns a single record