src/Graviton/CoreBundle/Controller/MainController.php
public function indexAction()
    {
        $response = $this->response;

        $mainPage = new \stdClass();
        $mainPage->services = $this->determineServices(
            $this->restUtils->getOptionRoutes()
        );

        $mainPage->thirdparty = $this->registerThirdPartyServices();

        $response->setContent(json_encode($mainPage));
        $response->setStatusCode(Response::HTTP_OK);
        $response->headers->set('Link', $this->prepareLinkHeader());

        // todo: make sure, that the correct content type is set.
        // todo: this should be covered by a kernel.response event listener?
        $response->headers->set('Content-Type', 'application/json');

        return $response;
    }
public function indexAction()
    {
        $response = $this->response;

        $mainPage = new \stdClass();
        $mainPage->services = $this->determineServices(
            $this->restUtils->getOptionRoutes()
        );

        $mainPage->thirdparty = $this->registerThirdPartyServices();

        $response->setContent(json_encode($mainPage));
        $response->setStatusCode(Response::HTTP_OK);
        $response->headers->set('Link', $this->prepareLinkHeader());

        // todo: make sure, that the correct content type is set.
        // todo: this should be covered by a kernel.response event listener?
        $response->headers->set('Content-Type', 'application/json');

        return $response;
    }
public function indexAction ( ) { $ response = $ this -> response ; $ mainPage = new \ stdClass ( ) ; $ mainPage -> services = $ this -> determineServices ( $ this -> restUtils -> getOptionRoutes ( ) ) ; $ mainPage -> thirdparty = $ this -> registerThirdPartyServices ( ) ; $ response -> setContent ( json_encode ( $ mainPage ) ) ; $ response -> setStatusCode ( Response :: HTTP_OK ) ; $ response -> headers -> set ( 'Link' , $ this -> prepareLinkHeader ( ) ) ; // todo: make sure, that the correct content type is set. // todo: this should be covered by a kernel.response event listener? $ response -> headers -> set ( 'Content-Type' , 'application/json' ) ; return $ response ; }
create simple start page.

@return Response $response Response with result or error
create simple start page .