Returns the route base to use for the current class.
430394
def get_base_route(cls):
        """"""
        base_route = cls.__name__.lower()
        if cls.base_route is not None:
            base_route = cls.base_route
            base_rule = parse_rule(base_route)
            cls.base_args = [r[2] for r in base_rule]
        return base_route.strip("/")
1195133
def get(self, route: str(), callback: object()):
        
        self.__set_route('get', {route: callback})
        return RouteMapping
621705
protected function getCurrentUri()
  {
    // Get the current Request URI and remove rewrite base path from it (= allows one to run the router in a sub folder)
    $uri = substr($_SERVER['REQUEST_URI'], strlen($this->getBasePath()));
    // Don't take query params into account on the URL
    if (strstr($uri, '?')) {
      $uri = substr($uri, 0, strpos($uri, '?'));
    }
    // Remove trailing slash + enforce a slash at the start
    return '/' . trim($uri, '/');
  }
606532
public function getCurrentRouteMatch() {
    if (empty($this->currentRouteMatch)) {
      $this->currentRouteMatch = \Drupal::service('current_route_match');
    }
    return $this->currentRouteMatch;
  }
1205206
def base_url(self):
        """"""
        if self.location in self.known_locations:
            return self.known_locations[self.location]
        elif '.' in self.location or self.location == 'localhost':
            return 'https://' + self.location
        else:
            return 'https://' + self.location + API_HOST_SUFFIX
26413
public static function getCurrentRoute()
    {
        if (!static::$currentRoute) {
            $uri = Grav::instance()['uri'];
            static::$currentRoute = RouteFactory::createFromParts($uri->toArray());
        }

        return static::$currentRoute;
    }
560510
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        return "%s/%s" % (url, name)
446516
public function getCurrentRouteName()
    {
        if (null === $this->currentRouteName)
        {
            $this->currentRouteName = $this->getRequest()->get('_route');
        }

        return $this->currentRouteName;
    }
16861
public function routeName() {
        if (!$this->currentRoute) {
            $request = $this->stack->getCurrentRequest();

            if ($request instanceof Request) {
                $this->currentRoute = $request->get('_route');
            }
        }

        return $this->currentRoute;
    }
1250582
def path(self):
        ""
        prefix = ()
        if self.parent:
            prefix = self.parent.path

        if self.id_or_name:
            return prefix + (self.kind, self.id_or_name)

        return prefix + (self.kind,)
669133
def get_model_url_base():
    '''
    
    '''
    url_base = get_model_url_base_from_env()
    if url_base is not None:
        logger.info('NNBLA_MODELS_URL_BASE is set as {}.'.format(url_base))
    else:
        url_base = 'https://nnabla.org/pretrained-models/nnp_models/'
    return url_base
295055
public function getRoutesPath($basePath = null)
    {
        $routes = $this->get('routes');
        if (empty($routes)) {
            // Fallback to default
            return $basePath . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'routes' . DIRECTORY_SEPARATOR . 'main.php';
        }

        return $basePath . DIRECTORY_SEPARATOR . $routes['base_dir'] . DIRECTORY_SEPARATOR . $routes['base_file'];
    }
1327068
@Override
  public String getQueryBaseRoute() {
    final String[] parts = explodePath();
    if (parts.length < 2) { // Must be at least something like: /plugin/blah
      throw new BadRequestException("Invalid plugin request path: " + getQueryPath());
    }
    return parts[1];
  }
756422
def path(self, *paths, **kwargs):
        
        return self.__class__(self.__root__, *paths, **kwargs)
1016468
def _url(self):
        """"""
        if self.ID_NAME not in self.route.keys() and "id" in self.data.keys():
            self.route[self.ID_NAME] = self.data["id"]
        return self.config.BASE + self.PATH.format(**self.route)
550675
public function getBasePath()
    {
        if (null == $this->basePath) {
            $this->basePath = strtolower($this->controllerName);
        }
        return $this->basePath;
    }
204653
def base_path(self):
        """"""
        return os.path.join(self.container.base_path, self.name)