You are here

public function Kernel::getRootDir in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Kernel.php \Symfony\Component\HttpKernel\Kernel::getRootDir()

Gets the application root dir.

Return value

string The application root dir

Overrides KernelInterface::getRootDir

1 call to Kernel::getRootDir()
Kernel::__construct in vendor/symfony/http-kernel/Kernel.php
Constructor.

File

vendor/symfony/http-kernel/Kernel.php, line 329

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

public function getRootDir() {
  if (null === $this->rootDir) {
    $r = new \ReflectionObject($this);
    $this->rootDir = dirname($r
      ->getFileName());
  }
  return $this->rootDir;
}