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

Breadcrumb

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

function SpdxLicenses::loadExceptions

Return value

void

1 call to SpdxLicenses::loadExceptions()
SpdxLicenses::__construct in vendor/composer/spdx-licenses/src/SpdxLicenses.php

File

vendor/composer/spdx-licenses/src/SpdxLicenses.php, line 242

Class

SpdxLicenses

Namespace

Composer\Spdx

Code

private function loadExceptions() {
    if (null !== $this->exceptions) {
        return;
    }
    $json = file_get_contents(self::getResourcesDir() . '/' . self::EXCEPTIONS_FILE);
    if (false === $json) {
        throw new \RuntimeException('Missing exceptions file in ' . self::getResourcesDir() . '/' . self::EXCEPTIONS_FILE);
    }
    $this->exceptions = array();
    foreach (json_decode($json, true) as $identifier => $exception) {
        $this->exceptions[strtolower($identifier)] = array(
            $identifier,
            $exception[0],
        );
    }
}

API Navigation

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