Copied!

Encoder delegating the decoding to a chain of encoders.

CloneableInstantiable
Methods
public __construct(array $encoders = [])
 
  • param \EncoderInterface[] $encoders
public final encode(?mixed $data, string $format, array $context = []) : string
public needsNormalization(string $format, array $context = []) : bool
 

Checks whether the normalization is needed for the given format.

public supportsEncoding(string $format, array $context = []) : bool
Properties
private array $encoderByFormat = []
 
  • var array<string,array-key>
privatereadonly array $encoders
Methods
private getEncoder(string $format, array $context) : Symfony\Component\Serializer\Encoder\EncoderInterface
 

Gets the encoder supporting the format.

  • throws \RuntimeException if no encoder is found
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration