Get all of the segments for the request path.

@return array
197774
public function segments()
    {
        $segments = explode('/', $this->decodedPath());

        return array_values(array_filter($segments, function ($value) {
            return $value !== '';
        }));
    }
37235
public static function getFullPath() {
        $s = &$_SERVER;
        $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true : false;
        $sp = strtolower($s['SERVER_PROTOCOL']);
        $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');
        $port = $s['SERVER_PORT'];
        $port = ((!$ssl && $port == '80') || ($ssl && $port == '443')) ? '' : ':' . $port;
        $host = isset($s['HTTP_X_FORWARDED_HOST']) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
        $host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
        $uri = $protocol . '://' . $host . $s['REQUEST_URI'];
        $segments = explode('?', $uri, 2);
        $url = $segments[0];
        return $url;
    }
1219941
public function getGateways()
    {
        $gateways = [];
        foreach ($this->_gateways as $id => $gateway) {
            $gateways[$id] = $this->getGateway($id);
        }
        return $gateways;
    }
1079104
protected function getRoutes()
    {
        $c = self::ROUTE_PATTERN_CONTROLLER;
        $a = self::ROUTE_PATTERN_ACTION;
        $p = self::ROUTE_PATTERN_PARAMS;
        return array(
            "/" => self::MATCHES_NOTHING,
            "/$c" => self::MATCHES_CONTROLLER,
            "/$c/" => self::MATCHES_CONTROLLER,
            "/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/$p" => self::MATCHES_CONTROLLER_ACTION_AND_PARAMS
        );
    }
1222003
public function getPaths() {
		
		if ($this->lastUrlDisabled) {
			$newPaths = $this->paths;
			end($newPaths)->url = NULL;
			return $newPaths;
		} else {
			return $this->paths;
		}
		
	}
302254
private function getLaravelPaths()
    {
        $is54 = version_compare(\Illuminate\Foundation\Application::VERSION, '5.4.0', '>');
        $paths = [
            'app' => $this->app[ 'path' ],
            'envFile' => $this->app->environmentFilePath(),
            'env' => $this->app->environmentPath(),
            'cached' => [
                'compile' => $is54 ? null : $this->app->getCachedCompilePath(),
                'config' => $this->app->getCachedConfigPath(),
                'routes' => $this->app->getCachedRoutesPath(),
                'services' => $this->app->getCachedServicesPath(),
            ],
        ];
        foreach (['base', 'lang', 'config', 'public', 'storage', 'database', 'bootstrap'] as $key) {
            $paths[ $key ] = $this->app[ 'path.'.$key ];
        }
        $paths[ 'resource' ] = resource_path();

        return $paths;
    }
384195
public static function getRequestUriParts() {
    $requestUri = self::get(self::REQUEST_URI);
    $requestUri = mb_split('\?', $requestUri)[0];
    $parts = mb_split('\/', $requestUri);
    if (count($parts) > 1 && $parts[0] === '') {
      $parts = array_slice($parts, 1);
    }
    if (count($parts) > 1 && $parts[count($parts) - 1] === '') {
      $parts = array_slice($parts, 0, count($parts) - 1);
    }
    return $parts;
  }
1310660
public function getSchemaEntryPoints()
	{
		if ( $this->entryPoints ) return $this->entryPoints;

		$entryPoints = array();

		$this->traverseContents( function( $path, $name, $type ) use( &$entryPoints )
		{
			if ( $type == PATHINFO_DIRNAME ) return true;
			if ( ! \XBRL::endsWith( $name, '.xsd' ) ) return true;
			if ( ! XBRL::compiled_taxonomy_for_xsd( $name ) ) return true;
			$common = $this->getCommonRootFolder( "$path$name", $this->schemaFile );
			$entryPoints[] = $common['uri'];
			return true;
		} );

		$this->entryPoints = $entryPoints;
		return $entryPoints;
	}
1035014
public function getPath()
    {
        if ($this->requestTarget === null) {
            return $this->uri->getPath();
        }

        list($path) = explode('?', $this->requestTarget);

        return $path;
    }
915402
public function getAllRoutes()
    {
        $routes = [];
        foreach ($this->getRoutes() as $path => $route) {
            if (array_key_exists('slug', $route)) {
                $routes[$route['slug']] = $path;
            }
        }
        return $routes;
    }
506442
public function getPathTree(): array
    {
        $tree = [];
        foreach ($this->getTree() as $branch) {
            $tree[] = Path::make($branch);
        }

        return $tree;
    }
549358
public function getAllPaths()
    {
        $paths = [];

        foreach ($this->paths as $path)
        {
            $file = __DIR__ . '/../../../' . $path;

            if (!file_exists($file) || is_dir($file))
            {
                throw new FileNotFoundException("File '{$file}' not found.");
            }

            $paths[] = new \SplFileInfo($file);
        }

        return $paths;
    }
744656
public function getPathExtension()
    {
        $segments = $this->getPathSegments();
        $filename = array_pop($segments);
        $extension = strrchr($filename, '.');

        if ($extension === false) {
            return '';
        }

        return substr($extension, 1);
    }
972062
protected function path() {
    $params = [];
    // Take arguments and pass them to the path by replacing {argument} tokens.
    foreach ($this->path_args as $argument => $value) {
      $params["{{$argument}}"] = $value;
    }
    $path = str_replace(array_keys($params), array_values($params), $this->path);
    return $this->endpoint . $path;
  }
657784
public function getResourcePath()
    {
        if (empty($this->resource)) {
            $path = request()->path();

            $segments = explode('/', $path);
            array_pop($segments);

            $this->resource = implode('/', $segments);
        }

        return $this->resource;
    }
1361613
public function getTree(): array
    {
        $tree = [];
        $size = count($this->segments);

        for ($index = 0; $index < $size; $index = $index + 1) {
            $temp = array_slice($this->segments, 0, $index + 1);
            $path = implode(DIRECTORY_SEPARATOR, $temp);

            $tree[] = Path::normalize($path);
        }

        return $tree;
    }
240151
public function getAllLocalizedRoutes($segments = null, $leadSlash = true, $fullPath = false) {
        /*
         * routes with dynamic parameter(s)
         */
        if ($allRoutes = $this->getAllLocalazedDynamicRoutes($segments, $leadSlash, $fullPath)) {
            return $allRoutes;
        }
        
        /*
         * static routes
         */
        $allRoutes = [];
        // if segmets are not set - get from current request
        if (is_null($segments)) {
            $segments = \Request::segments();
        }
        elseif (is_string($segments)) {
            $segments = explode('/', $segments);
        }
        
        // if locale segment set - remove it from [0]
        if ($this->isSetLocaleSegmentInRoute($segments)) {
            array_shift($segments);
        }

        // loop each posiable locales and build localized rote
        foreach($this->getAllRoutelocales() as $locale) {
            $path = '';
            if (($this->getDefaultRoutelocale() !== $locale) || $this->isUsePrefixForDefaultLocale()) {
                // add locale to [0] segment
                $path = ($leadSlash ? '/' : '') . implode('/', array_merge([$locale], $segments));
            }
            else {
                // if it is default locale - DO NOT add it to [0] segment
                $path = ($leadSlash ? '/' : '') . implode('/', $segments);
            }
            $allRoutes[$locale] = $fullPath ? \URL::to($path) : $path;
        }
        return $allRoutes;
    }