public function Request::getUriForPath

Generates a normalized URI for the given path.

@api

Parameters

string $path A path to use instead of the current one:

Return value

string The normalized URI for the path

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getUriForPath($path) {
  return $this
    ->getSchemeAndHttpHost() . $this
    ->getBaseUrl() . $path;
}