function YamlCacheCollector::parseFile
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Utility/YamlCacheCollector.php \Drupal\Core\Utility\YamlCacheCollector::parseFile()
Parses a file given a filename and returns the result.
Parameters
string $file: The file path.
Return value
mixed The result of the file parsing.
Overrides FileParsingCacheCollectorBase::parseFile
File
-
core/
lib/ Drupal/ Core/ Utility/ YamlCacheCollector.php, line 17
Class
- YamlCacheCollector
- Caches YAML parsing in a cache collector.
Namespace
Drupal\Core\UtilityCode
protected function parseFile($file) : array {
return Yaml::decode($file) ?? [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.