function XmlEncoder::getBaseEncoder
Same name in other branches
- 8.9.x core/modules/serialization/src/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::getBaseEncoder()
- 10 core/modules/serialization/src/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::getBaseEncoder()
- 11.x core/modules/serialization/src/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::getBaseEncoder()
Gets the base encoder instance.
Return value
\Symfony\Component\Serializer\Encoder\XmlEncoder The base encoder.
File
-
core/
modules/ serialization/ src/ Encoder/ XmlEncoder.php, line 45
Class
- XmlEncoder
- Adds XML support for serializer.
Namespace
Drupal\serialization\EncoderCode
public function getBaseEncoder() {
if (!isset($this->baseEncoder)) {
$this->baseEncoder = new BaseXmlEncoder();
$this->baseEncoder
->setSerializer($this->serializer);
}
return $this->baseEncoder;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.