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 814

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

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