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

Breadcrumb

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

function ChainEncoder::encode

Overrides EncoderInterface::encode

File

vendor/symfony/serializer/Encoder/ChainEncoder.php, line 41

Class

ChainEncoder
Encoder delegating the decoding to a chain of encoders.

Namespace

Symfony\Component\Serializer\Encoder

Code

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