src/Graviton/RestBundle/Listener/LinkHeaderResponseListener.php
private function generatePagingLinksHeaders($routeName, Request $request, Response $response)
    {
        $rql = '';
        if ($request->attributes->get('hasRql', false)) {
            $rql = $request->attributes->get('rawRql', '');
        }

        $this->generateLinks(
            $routeName,
            $request->attributes->get('page'),
            $request->attributes->get('numPages'),
            $request->attributes->get('perPage'),
            $request,
            $rql
        );

        $response->headers->set(
            'X-Total-Count',
            (string) $request->attributes->get('totalCount')
        );
    }
private function generatePagingLinksHeaders($routeName, Request $request, Response $response)
    {
        $rql = '';
        if ($request->attributes->get('hasRql', false)) {
            $rql = $request->attributes->get('rawRql', '');
        }

        $this->generateLinks(
            $routeName,
            $request->attributes->get('page'),
            $request->attributes->get('numPages'),
            $request->attributes->get('perPage'),
            $request,
            $rql
        );

        $response->headers->set(
            'X-Total-Count',
            (string) $request->attributes->get('totalCount')
        );
    }
private function generatePagingLinksHeaders ( $ routeName , Request $ request , Response $ response ) { $ rql = '' ; if ( $ request -> attributes -> get ( 'hasRql' , false ) ) { $ rql = $ request -> attributes -> get ( 'rawRql' , '' ) ; } $ this -> generateLinks ( $ routeName , $ request -> attributes -> get ( 'page' ) , $ request -> attributes -> get ( 'numPages' ) , $ request -> attributes -> get ( 'perPage' ) , $ request , $ rql ) ; $ response -> headers -> set ( 'X-Total-Count' , ( string ) $ request -> attributes -> get ( 'totalCount' ) ) ; }
generates the paging Link header items

@param string   $routeName route name
@param Request  $request   request
@param Response $response  response

@return void
generates the paging Link header items