public function Request::getBasePath

Returns the root path from which this request is executed.

Suppose that an index.php file instantiates this request object:

@api

Return value

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

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getBasePath() {
  if (null === $this->basePath) {
    $this->basePath = $this
      ->prepareBasePath();
  }
  return $this->basePath;
}