src/Graviton/RestBundle/Routing/Loader/BasicLoader.php
public function loadReadOnlyRoutes($service, $resource, $serviceConfig)
    {

        $actionOptions = ActionUtils::getRouteOptions($service, $serviceConfig);
        $this->routes->add($resource . '.options', $actionOptions);

        $actionOptionsNoSlash = ActionUtils::getRouteOptions($service, $serviceConfig);
        $actionOptionsNoSlash->setPath(substr($actionOptionsNoSlash->getPath(), 0, -1));
        $this->routes->add($resource . '.optionsNoSlash', $actionOptionsNoSlash);

        $actionHead = ActionUtils::getRouteHead($service, $serviceConfig);
        $this->routes->add($resource . '.head', $actionHead);

        $actionHead = ActionUtils::getRouteHead($service, $serviceConfig, [], true);
        $this->routes->add($resource . '.idHead', $actionHead);

        $actionGet = ActionUtils::getRouteGet($service, $serviceConfig);
        $this->routes->add($resource . '.get', $actionGet);

        $actionAll = ActionUtils::getRouteAll($service, $serviceConfig);
        $this->routes->add($resource . '.all', $actionAll);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig, 'collection');
        $this->routes->add($resource . '.canonicalSchema', $actionOptions);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig, 'collection', true);
        $this->routes->add($resource . '.canonicalSchemaOptions', $actionOptions);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig);
        $this->routes->add($resource . '.canonicalIdSchema', $actionOptions);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig, 'item', true);
        $this->routes->add($resource . '.canonicalIdSchemaOptions', $actionOptions);

        $actionOptions = ActionUtils::getRouteOptions($service, $serviceConfig, [], true);
        $this->routes->add($resource . '.idOptions', $actionOptions);
    }
public function loadReadOnlyRoutes($service, $resource, $serviceConfig)
    {

        $actionOptions = ActionUtils::getRouteOptions($service, $serviceConfig);
        $this->routes->add($resource . '.options', $actionOptions);

        $actionOptionsNoSlash = ActionUtils::getRouteOptions($service, $serviceConfig);
        $actionOptionsNoSlash->setPath(substr($actionOptionsNoSlash->getPath(), 0, -1));
        $this->routes->add($resource . '.optionsNoSlash', $actionOptionsNoSlash);

        $actionHead = ActionUtils::getRouteHead($service, $serviceConfig);
        $this->routes->add($resource . '.head', $actionHead);

        $actionHead = ActionUtils::getRouteHead($service, $serviceConfig, [], true);
        $this->routes->add($resource . '.idHead', $actionHead);

        $actionGet = ActionUtils::getRouteGet($service, $serviceConfig);
        $this->routes->add($resource . '.get', $actionGet);

        $actionAll = ActionUtils::getRouteAll($service, $serviceConfig);
        $this->routes->add($resource . '.all', $actionAll);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig, 'collection');
        $this->routes->add($resource . '.canonicalSchema', $actionOptions);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig, 'collection', true);
        $this->routes->add($resource . '.canonicalSchemaOptions', $actionOptions);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig);
        $this->routes->add($resource . '.canonicalIdSchema', $actionOptions);

        $actionOptions = ActionUtils::getCanonicalSchemaRoute($service, $serviceConfig, 'item', true);
        $this->routes->add($resource . '.canonicalIdSchemaOptions', $actionOptions);

        $actionOptions = ActionUtils::getRouteOptions($service, $serviceConfig, [], true);
        $this->routes->add($resource . '.idOptions', $actionOptions);
    }
public function loadReadOnlyRoutes ( $ service , $ resource , $ serviceConfig ) { $ actionOptions = ActionUtils :: getRouteOptions ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.options' , $ actionOptions ) ; $ actionOptionsNoSlash = ActionUtils :: getRouteOptions ( $ service , $ serviceConfig ) ; $ actionOptionsNoSlash -> setPath ( substr ( $ actionOptionsNoSlash -> getPath ( ) , 0 , - 1 ) ) ; $ this -> routes -> add ( $ resource . '.optionsNoSlash' , $ actionOptionsNoSlash ) ; $ actionHead = ActionUtils :: getRouteHead ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.head' , $ actionHead ) ; $ actionHead = ActionUtils :: getRouteHead ( $ service , $ serviceConfig , [ ] , true ) ; $ this -> routes -> add ( $ resource . '.idHead' , $ actionHead ) ; $ actionGet = ActionUtils :: getRouteGet ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.get' , $ actionGet ) ; $ actionAll = ActionUtils :: getRouteAll ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.all' , $ actionAll ) ; $ actionOptions = ActionUtils :: getCanonicalSchemaRoute ( $ service , $ serviceConfig , 'collection' ) ; $ this -> routes -> add ( $ resource . '.canonicalSchema' , $ actionOptions ) ; $ actionOptions = ActionUtils :: getCanonicalSchemaRoute ( $ service , $ serviceConfig , 'collection' , true ) ; $ this -> routes -> add ( $ resource . '.canonicalSchemaOptions' , $ actionOptions ) ; $ actionOptions = ActionUtils :: getCanonicalSchemaRoute ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.canonicalIdSchema' , $ actionOptions ) ; $ actionOptions = ActionUtils :: getCanonicalSchemaRoute ( $ service , $ serviceConfig , 'item' , true ) ; $ this -> routes -> add ( $ resource . '.canonicalIdSchemaOptions' , $ actionOptions ) ; $ actionOptions = ActionUtils :: getRouteOptions ( $ service , $ serviceConfig , [ ] , true ) ; $ this -> routes -> add ( $ resource . '.idOptions' , $ actionOptions ) ; }
generate ro routes

@param string $service       service name
@param string $resource      resource name
@param array  $serviceConfig service configuration

@return void
generate ro routes