InfoParser.php

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

Namespace

Drupal\Core\Extension

File

core/lib/Drupal/Core/Extension/InfoParser.php

View source
<?php

namespace Drupal\Core\Extension;


/**
 * Parses extension .info.yml files.
 */
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];
    }

}

Classes

Title Deprecated Summary
InfoParser Parses extension .info.yml files.

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