code: 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;
      }
docs: It returns the URL path of the request.
  @return string|null