class Yaml

Same name in this branch
  1. 10 core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml
Same name in other branches
  1. 9 core/lib/Drupal/Core/Serialization/Yaml.php \Drupal\Core\Serialization\Yaml
  2. 9 core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml
  3. 8.9.x core/lib/Drupal/Core/Serialization/Yaml.php \Drupal\Core\Serialization\Yaml
  4. 8.9.x core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml
  5. 11.x core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml

Provides a YAML serialization implementation.

Allow settings to override the YAML implementation resolution.

Hierarchy

Expanded class hierarchy of Yaml

43 files declare their use of Yaml
add_pagination_heading.php in core/modules/views/tests/fixtures/update/add_pagination_heading.php
Test fixture.
AutoconfigurationTest.php in core/tests/Drupal/KernelTests/Core/DependencyInjection/AutoconfigurationTest.php
AutowireTest.php in core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php
ckeditor5-3222756.php in core/modules/ckeditor5/tests/fixtures/update/ckeditor5-3222756.php
Test fixture.
ckeditor5-3259593.php in core/modules/ckeditor5/tests/fixtures/update/ckeditor5-3259593.php
Test fixture.

... See full list

1 string reference to 'Yaml'
YamlSymfonyTest::taggedValuesProvider in core/tests/Drupal/Tests/Component/Serialization/YamlSymfonyTest.php
Data provider for testCustomTagSupport().

File

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

Namespace

Drupal\Core\Serialization
View source
class Yaml extends ComponentYaml {
    public static function decode($raw) {
        $class = Settings::get('yaml_parser_class');
        if ($class && $class !== TRUE) {
            return $class::decode($raw);
        }
        return parent::decode($raw);
    }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title
Yaml::decode public static function Decodes data from the serialization format. Overrides Yaml::decode
Yaml::encode public static function Encodes data into the serialization format. Overrides SerializationInterface::encode
Yaml::getFileExtension public static function Gets the file extension for this serialization format. Overrides SerializationInterface::getFileExtension
Yaml::getSerializer Deprecated protected static function Determines which implementation to use for parsing YAML.

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