YamlCacheCollector.php
Same filename and directory in other branches
Namespace
Drupal\Core\UtilityFile
-
core/
lib/ Drupal/ Core/ Utility/ YamlCacheCollector.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Core\Utility;
use Drupal\Component\Serialization\Yaml;
/**
* Caches YAML parsing in a cache collector.
*/
class YamlCacheCollector extends FileParsingCacheCollectorBase {
/**
* {@inheritdoc}
*/
protected function parseFile($file) : array {
return Yaml::decode($file) ?? [];
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| YamlCacheCollector | Caches YAML parsing in a cache collector. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.