You are here

public function Request::getUri in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::getUri()
  2. 8.0 vendor/symfony/browser-kit/Request.php \Symfony\Component\BrowserKit\Request::getUri()
  3. 8.0 vendor/guzzlehttp/psr7/src/Request.php \GuzzleHttp\Psr7\Request::getUri()
Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::getUri()

Generates a normalized URI (URL) for the Request.

Return value

string A normalized URI (URL) for the Request

See also

getQueryString()

File

vendor/symfony/http-foundation/Request.php, line 1074

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;
}