function SerializationInterface::decode
Same name in other branches
- 9 core/lib/Drupal/Component/Serialization/SerializationInterface.php \Drupal\Component\Serialization\SerializationInterface::decode()
- 8.9.x core/lib/Drupal/Component/Serialization/SerializationInterface.php \Drupal\Component\Serialization\SerializationInterface::decode()
- 11.x core/lib/Drupal/Component/Serialization/SerializationInterface.php \Drupal\Component\Serialization\SerializationInterface::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
4 methods override SerializationInterface::decode()
- Json::decode in core/
lib/ Drupal/ Component/ Serialization/ Json.php - Decodes data from the serialization format.
- Yaml::decode in core/
lib/ Drupal/ Component/ Serialization/ Yaml.php - Decodes data from the serialization format.
- YamlPecl::decode in core/
lib/ Drupal/ Component/ Serialization/ YamlPecl.php - Decodes data from the serialization format.
- YamlSymfony::decode in core/
lib/ Drupal/ Component/ Serialization/ YamlSymfony.php - Decodes data from the serialization format.
File
-
core/
lib/ Drupal/ Component/ Serialization/ SerializationInterface.php, line 34
Class
- SerializationInterface
- Defines an interface for serialization formats.
Namespace
Drupal\Component\SerializationCode
public static function decode($raw);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.