Get route prefix.

@param  bool  $forceBase

@return string
541712
public function prefix($forceBase = false)
    {
        if (!is_string($this->prefix)) {
            return '/';
        }
        $pattern = trim($this->prefix, '/');

        if ($this->domain === null && $forceBase === true) {
            $pattern = trim($this->basePrefix, '/') . "/{$pattern}";
            $pattern = trim($pattern, '/');
        }
        empty($pattern) && $pattern = '/';
        return $pattern;
    }
1262654
public function listingRouters(bool $isbase = false):int
    {
        if ($this->appWording() == 1) {
            $this->routers = scandir((($isbase == false)? FEnv::get("framework.apps")
                    : FEnv::get("framework.baseapps")).
                $this->appName . "/Routing");
            return (1);
        }
        return (0);
    }
626027
public function getModulePath($base = self::DEFAULT_SOURCE)
    {
        if ($base === self::DEFAULT_TARGET) {
            return $this->getPublicPath();
        } else {
            return $this->getPath();
        }
    }
348701
protected function getResqueBinFile($base)
    {
        $paths = array(
            'bin' . DS . 'resque',
            'bin' . DS . 'resque.php',
            'resque.php'
        );

        foreach ($paths as $path) {
            if (file_exists($base . DS . $path)) {
                return '.' . DS . $path;
            }
        }
        return '.' . DS . 'resque.php';
    }
670790
public function getBasePath(): string
	{
		if($this->basePath === null)
		{
			$path = $this->server->get('SCRIPT_NAME');

			$this->basePath = rtrim(str_replace(basename($path), '', $path), '/');
		}

		return $this->basePath;
	}
606444
public function getRoutingPrefix()
    {
        $vendor = $this->getVendorName();
        $prefix = $this->getBundleName();
        $pattern = '#^(.+)Bundle$#';

        if (preg_match($pattern, $prefix, $matches)) {
            $prefix = $matches[1];
        }

        $prefix = strtolower("{$vendor}_{$prefix}");

        return $prefix;
    }
348635
protected function computeCredentialsName($prefix = null) {
		if (!$prefix) {
			$paths = $this->get('paths');
			if ($paths && isset($paths['default'])) {
				$prefix = $paths['default'];
			}
		}
		preg_match('/([http:\/\/|https:\/\/|ssh:\/\/])*(\w@)*([\w\.\-_]{1,}+)/', $prefix, $prefix);
		if (count($prefix)) return end($prefix);
		return basename($this->repository->getDir());
    }
502646
public function get_prefix($class_name){
        /** @var RestBase $class_name */
        if( !empty($class_name::$prefix) ){
            return $class_name::$prefix;
        }else{
            $seg = explode('\\', $class_name);
            $base = $seg[count($seg) - 1];
            return $this->str->camel_to_hyphen($base);
        }
    }
647156
public function getToken($forceRefresh = false)
    {
        $cacheKey = $this->cacheKey;

        $cached = $this->cache->get($cacheKey);

        if ($forceRefresh || !$cached) {
            $token = $this->getTokenFromServer();

            $this->cache->set($cacheKey, $token['access_token'], $token['expires_in'] - 800);

            return $token['access_token'];
        }

        return $cached;
    }
1193625
static public function getPathPrefix()
    {
        $ini = eZINI::instance();

        return $ini->hasVariable( 'SiteAccessSettings', 'PathPrefix' ) &&
            $ini->variable( 'SiteAccessSettings', 'PathPrefix' ) != ''
            ? eZURLAliasML::cleanURL( $ini->variable( 'SiteAccessSettings', 'PathPrefix' ) )
            : false;
    }
53855
public function getRouteName($route)
    {
        if (!$this->routePath) {
            // Grab route_prefix config first. If it's not set,
            // grab the resources, and replace `\` with `.`, and
            // transform it all to lowercase.
            $this->routePath = $this->getConfig('route_prefix')
                ?: str_replace('\\', '.', strtolower($this->getConfig('resources')));
        }
        return "{$this->routePath}.v{$this->current}" . str_after($route, $this->routePath);
    }
525136
public function getBaseUrl() : string
    {
        // Current Request URI
        $this->currentUrl = $this->server->get('REQUEST_URI');

        // Remove rewrite base path (= allows one to run the router in a sub folder)
        $basePath = implode('/', array_slice(explode('/', $this->server->get('SCRIPT_NAME')), 0, -1)).'/';

        return $basePath;
    }
871641
public function getArguments($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');

        $arguments = $this->arguments;

        if ($includeBase && $this->baseFormat) {
            // prepend base arguments
            $arguments = array_replace($this->baseFormat->getArguments(), $arguments);
        }

        return $arguments;
    }
900756
public function getBasename($suffix = null)
    {
        if (null === $suffix) {
            $suffix = static::SEPARATOR_EXTENSION.$this->getExtension();
        }

        return parent::getBasename((string)$suffix);
    }
973468
protected function getServiceIp(string $serviceName, bool $force = false): string
    {
        if (!isset($this->serviceIps[$serviceName]) || $force) {
            $serviceIp = $this->discovery->discover($serviceName);
            $this->serviceIps[$serviceName] = $serviceIp;
        }

        return $this->serviceIps[$serviceName];
    }
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("/")
855199
public function getBaseRouteName()
    {
        if (null !== $this->cachedBaseRouteName) {
            return $this->cachedBaseRouteName;
        }

        if ($this->isChild()) { // the admin class is a child, prefix it with the parent route name
            $baseRouteName = $this->baseRouteName;
            if (!$this->baseRouteName) {
                preg_match(self::CLASS_REGEX, $this->class, $matches);

                if (!$matches) {
                    throw new \RuntimeException(sprintf('Cannot automatically determine base route name, please define a default `baseRouteName` value for the admin class `%s`', \get_class($this)));
                }
                $baseRouteName = $this->urlize($matches[5]);
            }

            $this->cachedBaseRouteName = sprintf(
                '%s_%s',
                $this->getParent()->getBaseRouteName(),
                $baseRouteName
            );
        } elseif ($this->baseRouteName) {
            $this->cachedBaseRouteName = $this->baseRouteName;
        } else {
            preg_match(self::CLASS_REGEX, $this->class, $matches);

            if (!$matches) {
                throw new \RuntimeException(sprintf('Cannot automatically determine base route name, please define a default `baseRouteName` value for the admin class `%s`', \get_class($this)));
            }

            $this->cachedBaseRouteName = sprintf('admin_%s%s_%s',
                empty($matches[1]) ? '' : $this->urlize($matches[1]).'_',
                $this->urlize($matches[3]),
                $this->urlize($matches[5])
            );
        }

        return $this->cachedBaseRouteName;
    }