Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. XmlEncoder.php

function XmlEncoder::encode

Same name in this branch
  1. 11.1.x vendor/symfony/serializer/Encoder/XmlEncoder.php \Symfony\Component\Serializer\Encoder\XmlEncoder::encode()

Overrides EncoderInterface::encode

File

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

Class

XmlEncoder
Adds XML support for serializer.

Namespace

Drupal\serialization\Encoder

Code

public function encode($data, $format, array $context = []) : string {
    return $this->getBaseEncoder()
        ->encode($data, $format, $context);
}
RSS feed
Powered by Drupal