src/Graviton/RestBundle/Routing/Loader/BasicLoader.php
public function loadWriteRoutes($service, $resource, $serviceConfig)
    {
        $actionPost = ActionUtils::getRoutePost($service, $serviceConfig);
        $this->routes->add($resource . '.post', $actionPost);

        $actionPut = ActionUtils::getRoutePut($service, $serviceConfig);
        $this->routes->add($resource . '.put', $actionPut);

        $actionPostNoSlash = ActionUtils::getRoutePost($service, $serviceConfig);
        $actionPostNoSlash->setPath(substr($actionPostNoSlash->getPath(), 0, -1));
        $this->routes->add($resource . '.postNoSlash', $actionPostNoSlash);

        $actionPatch = ActionUtils::getRoutePatch($service, $serviceConfig);
        $this->routes->add($resource . '.patch', $actionPatch);

        $actionDelete = ActionUtils::getRouteDelete($service, $serviceConfig);
        $this->routes->add($resource . '.delete', $actionDelete);
    }
public function loadWriteRoutes($service, $resource, $serviceConfig)
    {
        $actionPost = ActionUtils::getRoutePost($service, $serviceConfig);
        $this->routes->add($resource . '.post', $actionPost);

        $actionPut = ActionUtils::getRoutePut($service, $serviceConfig);
        $this->routes->add($resource . '.put', $actionPut);

        $actionPostNoSlash = ActionUtils::getRoutePost($service, $serviceConfig);
        $actionPostNoSlash->setPath(substr($actionPostNoSlash->getPath(), 0, -1));
        $this->routes->add($resource . '.postNoSlash', $actionPostNoSlash);

        $actionPatch = ActionUtils::getRoutePatch($service, $serviceConfig);
        $this->routes->add($resource . '.patch', $actionPatch);

        $actionDelete = ActionUtils::getRouteDelete($service, $serviceConfig);
        $this->routes->add($resource . '.delete', $actionDelete);
    }
public function loadWriteRoutes ( $ service , $ resource , $ serviceConfig ) { $ actionPost = ActionUtils :: getRoutePost ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.post' , $ actionPost ) ; $ actionPut = ActionUtils :: getRoutePut ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.put' , $ actionPut ) ; $ actionPostNoSlash = ActionUtils :: getRoutePost ( $ service , $ serviceConfig ) ; $ actionPostNoSlash -> setPath ( substr ( $ actionPostNoSlash -> getPath ( ) , 0 , - 1 ) ) ; $ this -> routes -> add ( $ resource . '.postNoSlash' , $ actionPostNoSlash ) ; $ actionPatch = ActionUtils :: getRoutePatch ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.patch' , $ actionPatch ) ; $ actionDelete = ActionUtils :: getRouteDelete ( $ service , $ serviceConfig ) ; $ this -> routes -> add ( $ resource . '.delete' , $ actionDelete ) ; }
generate write routes

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

@return void
generate write routes