You are here

public static function Yaml::decode in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Serialization/Yaml.php \Drupal\Component\Serialization\Yaml::decode()

Decodes data from the serialization format.

Parameters

string $raw: The raw data string to decode.

Return value

mixed The decoded data.

Throws

\Drupal\Component\Serialization\Exception\InvalidDataTypeException

Overrides SerializationInterface::decode

6 calls to Yaml::decode()
ExtensionListTest::setupTestExtensionList in core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
Sets up an a test extension list.
GenerateTheme::execute in core/lib/Drupal/Core/Command/GenerateTheme.php
InstallerExistingConfigTestBase::prepareEnvironment in core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php
Prepares the current environment for running the test.
ModuleInfoTest::testModuleInfo in core/tests/Drupal/Tests/Core/Extension/ModuleInfoTest.php
Tests that core module info files have the expected keys.
YamlDirectoryDiscovery::findAll in core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php
Returns an array of discoverable items.

... See full list

File

core/lib/Drupal/Component/Serialization/Yaml.php, line 33

Class

Yaml
Provides a YAML serialization implementation.

Namespace

Drupal\Component\Serialization

Code

public static function decode($raw) {
  $serializer = static::getSerializer();
  return $serializer::decode($raw);
}