public function getUrlPath(): ?string
    {
        $uri = $this->getServerParam('REQUEST_URI', \FILTER_SANITIZE_URL);
        if (!is_null($uri)) {
            return parse_url($uri, \PHP_URL_PATH);
        }
        return null;
    }
public function getUrlPath(): ?string
    {
        $uri = $this->getServerParam('REQUEST_URI', \FILTER_SANITIZE_URL);
        if (!is_null($uri)) {
            return parse_url($uri, \PHP_URL_PATH);
        }
        return null;
    }
public function getUrlPath ( ) : ? string { $ uri = $ this -> getServerParam ( 'REQUEST_URI' , \ FILTER_SANITIZE_URL ) ; if ( ! is_null ( $ uri ) ) { return parse_url ( $ uri , \ PHP_URL_PATH ) ; } return null ; }
It returns the URL path of the request.
@return string|null
It returns the URL path of the request .