function XmlEncoder::setBaseEncoder

Same name in other branches
  1. 8.9.x core/modules/serialization/src/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::setBaseEncoder()
  2. 10 core/modules/serialization/src/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::setBaseEncoder()
  3. 11.x core/modules/serialization/src/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::setBaseEncoder()

Sets the base encoder instance.

Parameters

\Symfony\Component\Serializer\Encoder\XmlEncoder $encoder: The XML encoder.

File

core/modules/serialization/src/Encoder/XmlEncoder.php, line 60

Class

XmlEncoder
Adds XML support for serializer.

Namespace

Drupal\serialization\Encoder

Code

public function setBaseEncoder($encoder) {
    $this->baseEncoder = $encoder;
}

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