public function Request::getUri

Generates a normalized URI for the Request.

@api

Return value

string A normalized URI for the Request

See also

getQueryString()

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 967

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getUri() {
  if (null !== ($qs = $this
    ->getQueryString())) {
    $qs = '?' . $qs;
  }
  return $this
    ->getSchemeAndHttpHost() . $this
    ->getBaseUrl() . $this
    ->getPathInfo() . $qs;
}