You are here

public function Request::getBaseUrl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::getBaseUrl()

Returns the root URL from which this request is executed.

The base URL never ends with a /.

This is similar to getBasePath(), except that it also includes the script filename (e.g. index.php) if one exists.

Return value

string The raw URL (i.e. not urldecoded)

4 calls to Request::getBaseUrl()
Request::getUri in vendor/symfony/http-foundation/Request.php
Generates a normalized URI (URL) for the Request.
Request::getUriForPath in vendor/symfony/http-foundation/Request.php
Generates a normalized URI for the given path.
Request::prepareBasePath in vendor/symfony/http-foundation/Request.php
Prepares the base path.
Request::preparePathInfo in vendor/symfony/http-foundation/Request.php
Prepares the path info.

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getBaseUrl() {
  if (null === $this->baseUrl) {
    $this->baseUrl = $this
      ->prepareBaseUrl();
  }
  return $this->baseUrl;
}