class Yaml in Drupal 9
Same name in this branch
- 9 core/lib/Drupal/Core/Serialization/Yaml.php \Drupal\Core\Serialization\Yaml
- 9 core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Serialization/Yaml.php \Drupal\Core\Serialization\Yaml
Provides a YAML serialization implementation.
Allow settings to override the YAML implementation resolution.
Hierarchy
- class \Drupal\Component\Serialization\Yaml implements SerializationInterface
- class \Drupal\Core\Serialization\Yaml
Expanded class hierarchy of Yaml
31 files declare their use of Yaml
- addTourLegacyConfig.php in core/
modules/ tour/ tests/ fixtures/ addTourLegacyConfig.php - Adds deprecated tour config for testing updates.
- ConfigController.php in core/
modules/ config/ src/ Controller/ ConfigController.php - ConfigExportUITest.php in core/
modules/ config/ tests/ src/ Functional/ ConfigExportUITest.php - ConfigInstallProfileUnmetDependenciesTest.php in core/
modules/ config/ tests/ src/ Functional/ ConfigInstallProfileUnmetDependenciesTest.php - ConfigManager.php in core/
lib/ Drupal/ Core/ Config/ ConfigManager.php
File
- core/
lib/ Drupal/ Core/ Serialization/ Yaml.php, line 13
Namespace
Drupal\Core\SerializationView source
class Yaml extends ComponentYaml {
/**
* {@inheritdoc}
*/
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();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Yaml:: |
protected static | property | The YAML implementation to use. | |
Yaml:: |
public static | function |
Decodes data from the serialization format. Overrides SerializationInterface:: |
|
Yaml:: |
public static | function |
Encodes data into the serialization format. Overrides SerializationInterface:: |
|
Yaml:: |
public static | function |
Gets the file extension for this serialization format. Overrides SerializationInterface:: |
|
Yaml:: |
protected static | function |
Determines which implementation to use for parsing YAML. Overrides Yaml:: |