Get URL's path (part after domain, also known as URI)

@return string
@throws \Koldy\Url\Exception
326814
public function getPath(): string
    {
        if (!isset($this->segments['path'])) {
            throw new UrlException('Unable to get path for ' . $this->url);
        }

        return $this->segments['path'];
    }
413467
public function getUri()
    {
        if ($this->routeGenerated) {
            return $this->routeGenerated;
        }

        if ($this->routeName !== null) {
            return $this->routeGenerated = $this->urlGenerator->generate($this->routeName, $this->routeParams);
        }

        if (strpos($this->uri, '/') === 0 || !$this->parent) {
            return $this->routeGenerated = $this->uri;
        }

        $parentUri = $this->parent ? $this->parent->getUri() : null;
        if ($parentUri === null) {
            return $this->routeGenerated = $this->uri;
        }

        $routeGenerated = new Uri($parentUri);
        $routeGenerated = $routeGenerated->withPath($routeGenerated->getPath() . '/' . $this->uri);

        return $this->routeGenerated = (string) $routeGenerated;
    }
175118
public final function getPath(): string
   {
       return ltrim((!$this->redirect
            ? parent::getPath()
            : $this->redirect), self::SEPARATOR);
   }
56289
public function getUrlPath()
    {
        $sUri = $this->getServerParam('REQUEST_URI', \FILTER_SANITIZE_URL);
        if (!is_null($sUri)) {
            return parse_url($sUri, \PHP_URL_PATH);
        }
        return null;
    }
474005
public function getAbsoluteUrl()
    {
        $https = Kwf_Util_Https::domainSupportsHttps($this->getDomain());
        $protocol = $https ? 'https' : 'http';
        return $protocol . '://'.$this->getDomain().$this->url;
    }
847798
public function getPathFilename()
    {
        $path = $this->getPath();

        if ($this->isInternal()) {
            return $this->serverRoot.$path;
        }

        $path = $this->documentRoot.$path;

        if (is_dir($path) === true) {
            $path .= '/index.html';
        }

        return preg_replace('/\/\/+/', '/', $path);
    }
1064154
public function getPathInfo()
    {
        if ($this->pathInfo === null) {
            $end = strpos($this->uri, '?');

            if ($end === false) {
                $this->pathInfo = $this->uri;
            }else{
                $this->pathInfo = substr($this->uri, 0, $end);
            }

            if (empty($this->pathInfo)) {
                $this->pathInfo = '/';
            }
        }
        
        return $this->pathInfo;
    }
1242774
public function getPath()
    {
        $node = $this;
        $path = [];

        while (true) {
            $path[] = $node["name"];
            if ($node->isRoot()) {
                break;
            }

            $node = self::loadById($node["parents"][0]);
            if (is_null($node)) {
                throw new \Exception("No parent node found with ID {$node['parents'][0]}.");
            }

            if ($node->isRoot()) {
                break;
            }
        }

        $path = array_reverse($path);

        return implode('/', $path);
    }
42635
private function getCompleteUrl($uri = '')
    {
        $uri = $uri === '' ? $this->urlResolver->getPath() : $uri;
        $url = sprintf('%s%s', $this->urlResolver->getDomain(), $uri);

        if ($this->isGet() && $this->GET) {
            $url = sprintf('%s?%s', $url, http_build_query($this->GET->getAll()));
        }

        return $url;
    }
144085
public function getURL() {
		return $this->scheme.'://'.$this->domain.$this->path.($this->parameters ? '?'.http_build_query($this->parameters) : '');
	}
179457
public function getFullPathAttribute()
    {
        $pathSections = explode('/', $this->getFullPath());

        $slugsToExclude = array_wrap($this->domainMappedFolders);

        $finalSlug = collect($pathSections)
            ->filter()
            ->reject(function ($slug) use ($slugsToExclude) {
                return in_array($slug, $slugsToExclude);
            })
            ->implode('/');

        return str_start($finalSlug, '/');
    }
855660
public function getUri(): string
    {
        $uri = '';

        if ( null !== $this->scheme ) {
            $uri .= $this->scheme.':';
        }

        $authority = $this->getAuthority();

        if ( null !== $authority || $this->scheme === 'file' ) {
            $uri .= '//'.$authority;
        }

        $uri .= $this->path;

        if ( null !== $this->query ) {
            $uri .= '?'.$this->query;
        }

        if ( null !== $this->fragment ) {
            $uri .= '#'.$this->fragment;
        }

        return $uri;
    }
493019
public function getUri()
    {
        if ($this->valid() === false) {
            require_once 'Zend/Uri/Exception.php';
            throw new Zend_Uri_Exception('One or more parts of the URI are invalid');
        }

        $password = strlen($this->_password) > 0 ? ":$this->_password" : '';
        $auth     = strlen($this->_username) > 0 ? "$this->_username$password@" : '';
        $port     = strlen($this->_port) > 0 ? ":$this->_port" : '';
        $query    = strlen($this->_query) > 0 ? "?$this->_query" : '';
        $fragment = strlen($this->_fragment) > 0 ? "#$this->_fragment" : '';

        return $this->_scheme
             . '://'
             . $auth
             . $this->_host
             . $port
             . $this->_path
             . $query
             . $fragment;
    }
1069870
public function path() {
        $path = $this->pathInfo();
        $index = strpos($path, ".");
        if ($index) {
            $path = substr($path, 0, $index);
        }
        return $path;
    }
895914
public function getWebPath()
    {
        return (!empty($this->web_path) ? str_replace($this->getRootDir(), '', DirectoryHelper::slashDirname($this->web_path)) : '');
    }
826118
protected function getPath()
    {
        if (empty( $_GET['queried_url'] )) {
            if (false === strstr( $_SERVER['REQUEST_URI'], $_SERVER['PHP_SELF'] )) {
                if( $this->pretty_urls ){
                    return '/';
                } else {
                    $new_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '/';
                    header( "Location: $new_url" );
                    exit;
                }
            }
            return str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF'] );
        }
        return $_GET['queried_url'];
    }
702002
public function getPathInfo($url)
    {
        // Check for base URLs
        if ($this->dom->baseURI !== null) {
            if (substr($this->dom->baseURI, 0, 1) === '/') {
                // URLs starting with '/' override completely the URL defined in the link
                $pathBase = parse_url($url, PHP_URL_SCHEME) . '://' . parse_url($url, PHP_URL_HOST) . $this->dom->baseURI;
            } else {
                // Otherwise just prepend the base to the actual path
                $pathBase = parse_url($url, PHP_URL_SCHEME) . '://' . parse_url($url, PHP_URL_HOST) . dirname(parse_url($url, PHP_URL_PATH)) . '/' . rtrim($this->dom->baseURI, '/') . '/';
            }
        } else {
            $pathBase = parse_url($url, PHP_URL_SCHEME) . '://' . parse_url($url, PHP_URL_HOST) . dirname(parse_url($url, PHP_URL_PATH)) . '/';
        }

        $scheme = parse_url($pathBase, PHP_URL_SCHEME);
        $prePath = $scheme . '://' . parse_url($pathBase, PHP_URL_HOST);

        return [$pathBase, $scheme, $prePath];
    }