function Yaml::getSerializer

Same name in this branch
  1. 9 core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml::getSerializer()
Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Serialization/Yaml.php \Drupal\Core\Serialization\Yaml::getSerializer()
  2. 8.9.x core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml::getSerializer()
  3. 10 core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml::getSerializer()

Overrides Yaml::getSerializer

File

core/lib/Drupal/Core/Serialization/Yaml.php, line 18

Class

Yaml
Provides a YAML serialization implementation.

Namespace

Drupal\Core\Serialization

Code

protected static function getSerializer() {
    // Allow settings.php to override the YAML serializer.
    if (!isset(static::$serializer) && ($class = Settings::get('yaml_parser_class'))) {
        static::$serializer = $class;
    }
    return parent::getSerializer();
}

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