Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractBundle.php

function AbstractBundle::getPath

Overrides Bundle::getPath

File

vendor/symfony/http-kernel/Bundle/AbstractBundle.php, line 51

Class

AbstractBundle
A Bundle that provides configuration hooks.

Namespace

Symfony\Component\HttpKernel\Bundle

Code

public function getPath() : string {
    if (!isset($this->path)) {
        $reflected = new \ReflectionObject($this);
        // assume the modern directory structure by default
        $this->path = \dirname($reflected->getFileName(), 2);
    }
    return $this->path;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal