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

Breadcrumb

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

function InfoParser::__construct

InfoParser constructor.

Parameters

string $app_root: The root directory of the Drupal installation.

Overrides InfoParserDynamic::__construct

File

core/lib/Drupal/Core/Extension/InfoParser.php, line 27

Class

InfoParser
Parses extension .info.yml files.

Namespace

Drupal\Core\Extension

Code

public function __construct(string $app_root) {
    parent::__construct($app_root);
    if (FileCacheFactory::getPrefix() !== NULL) {
        $this->fileCache = FileCacheFactory::get('info_parser');
    }
    else {
        // Just use a static file cache when there is no prefix. This code path is
        // triggered when info is parsed prior to \Drupal\Core\DrupalKernel::boot()
        // running. This occurs during the very early installer and in some test
        // scenarios.
        $this->fileCache = new FileCache('info_parser', 'info_parser');
    }
}

API Navigation

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