src/Graviton/RestBundle/Routing/Loader/ActionUtils.php
private static function getBaseFromService($service, $serviceConfig)
    {
        if (isset($serviceConfig[0]['router-base']) && strlen($serviceConfig[0]['router-base']) > 0) {
            $base = $serviceConfig[0]['router-base'] . '/';
        } else {
            $parts = explode('.', $service);

            $entity = array_pop($parts);
            $module = $parts[1];

            $base = '/' . $module . '/' . $entity . '/';
        }

        return $base;
    }
private static function getBaseFromService($service, $serviceConfig)
    {
        if (isset($serviceConfig[0]['router-base']) && strlen($serviceConfig[0]['router-base']) > 0) {
            $base = $serviceConfig[0]['router-base'] . '/';
        } else {
            $parts = explode('.', $service);

            $entity = array_pop($parts);
            $module = $parts[1];

            $base = '/' . $module . '/' . $entity . '/';
        }

        return $base;
    }
private static function getBaseFromService ( $ service , $ serviceConfig ) { if ( isset ( $ serviceConfig [ 0 ] [ 'router-base' ] ) && strlen ( $ serviceConfig [ 0 ] [ 'router-base' ] ) > 0 ) { $ base = $ serviceConfig [ 0 ] [ 'router-base' ] . '/' ; } else { $ parts = explode ( '.' , $ service ) ; $ entity = array_pop ( $ parts ) ; $ module = $ parts [ 1 ] ; $ base = '/' . $ module . '/' . $ entity . '/' ; } return $ base ; }
Get entity name from service strings.

By convention the last part of the service string so far
makes up the entities name.

@param string $service       (partial) service id
@param array  $serviceConfig service configuration

@return string
Get entity name from service strings .