function DatabaseDriver::getModuleInfo

Same name in other branches
  1. 10 core/lib/Drupal/Core/Extension/DatabaseDriver.php \Drupal\Core\Extension\DatabaseDriver::getModuleInfo()

Gets the content of the info.yml file of the driver's module, as an array.

The info array is saved in the $info property.

Throws

\Drupal\Core\Extension\InfoParserException Exception thrown if there is a parsing error or the .info.yml file does not contain a required key.

3 calls to DatabaseDriver::getModuleInfo()
DatabaseDriver::getAutoloadInfo in core/lib/Drupal/Core/Extension/DatabaseDriver.php
DatabaseDriver::isExperimental in core/lib/Drupal/Core/Extension/DatabaseDriver.php
DatabaseDriver::isObsolete in core/lib/Drupal/Core/Extension/DatabaseDriver.php

File

core/lib/Drupal/Core/Extension/DatabaseDriver.php, line 213

Class

DatabaseDriver
Defines a database driver extension object.

Namespace

Drupal\Core\Extension

Code

private function getModuleInfo() : void {
    if (!isset($this->info)) {
        $infoParser = new InfoParser($this->root);
        $this->info = $infoParser->parse($this->getModule()
            ->getPathname());
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.