class InfoParser

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Extension/InfoParser.php \Drupal\Core\Extension\InfoParser
  2. 10 core/lib/Drupal/Core/Extension/InfoParser.php \Drupal\Core\Extension\InfoParser
  3. 8.9.x core/lib/Drupal/Core/Extension/InfoParser.php \Drupal\Core\Extension\InfoParser

Parses extension .info.yml files.

Hierarchy

Expanded class hierarchy of InfoParser

3 files declare their use of InfoParser
GenerateTheme.php in core/lib/Drupal/Core/Command/GenerateTheme.php
InfoParserUnitTest.php in core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php
ThemeExtensionListTest.php in core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php
1 string reference to 'InfoParser'
core.services.yml in core/core.services.yml
core/core.services.yml
1 service uses InfoParser
info_parser in core/core.services.yml
Drupal\Core\Extension\InfoParser

File

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

Namespace

Drupal\Core\Extension
View source
class InfoParser extends InfoParserDynamic {
  
  /**
   * Array of all info keyed by filename.
   *
   * @var array
   */
  protected static $parsedInfos = [];
  
  /**
   * {@inheritdoc}
   */
  public function parse($filename) {
    if (!isset(static::$parsedInfos[$filename])) {
      static::$parsedInfos[$filename] = parent::parse($filename);
    }
    return static::$parsedInfos[$filename];
  }

}

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