function YamlCacheCollectorDiscovery::decode

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php \Drupal\Core\Discovery\YamlCacheCollectorDiscovery::decode()

Overrides YamlDiscovery::decode

File

core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php, line 51

Class

YamlCacheCollectorDiscovery
Provides discovery for YAML files within a given set of directories.

Namespace

Drupal\Core\Discovery

Code

protected function decode($file) : array {
  try {
    return $this->yamlCacheCollector
      ->get($file);
  } catch (InvalidDataTypeException $e) {
    throw new InvalidDataTypeException($file . ': ' . $e->getMessage(), $e->getCode(), $e);
  }
}

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