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

Breadcrumb

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

function Extension::parseInfo

1 call to Extension::parseInfo()
Extension::getDependencies in vendor/mglaman/phpstan-drupal/src/Drupal/Extension.php

File

vendor/mglaman/phpstan-drupal/src/Drupal/Extension.php, line 226

Class

Extension
Defines an extension (file) object.

Namespace

mglaman\PHPStanDrupal\Drupal

Code

private function parseInfo() : array {
    if (is_array($this->info)) {
        return $this->info;
    }
    $infoContent = file_get_contents(sprintf('%s/%s', $this->root, $this->getPathname()));
    if (false === $infoContent) {
        throw new RuntimeException(sprintf('Cannot read "%s', $this->getPathname()));
    }
    return $this->info = Yaml::parse($infoContent);
}

API Navigation

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