YamlDiscovery::decode

protected YamlDiscovery::decode($file)

Decode a YAML file.

Parameters

string $file: Yaml file path.

Return value

array

Overrides YamlDiscovery::decode

File

core/lib/Drupal/Core/Discovery/YamlDiscovery.php, line 18

Class

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

Namespace

Drupal\Core\Discovery

Code

protected function decode($file) {
  return Yaml::decode(file_get_contents($file)) ? : [];
}
doc_Drupal
2016-10-29 09:56:57
Comments
Leave a Comment

Please login to continue.