XmlEncoder
class XmlEncoder implements SerializerAwareInterface, EncoderInterface, DecoderInterface (View source)
| internal | This encoder should not be used directly. Rather, use the `serializer` service. |
Adds XML support for serializer.
This acts as a wrapper class for Symfony's XmlEncoder so that it is not implementing NormalizationAwareInterface, and can be normalized externally.
Traits
SerializerAwareTrait
Properties
| static protected array | $format | The formats that this Encoder supports. |
|
| protected XmlEncoder | $baseEncoder | An instance of the Symfony XmlEncoder to perform the actual encoding. |
Methods
XmlEncoder
getBaseEncoder()
Gets the base encoder instance.
setBaseEncoder(XmlEncoder $encoder)
Sets the base encoder instance.
encode($data, $format, array $context = [])
{@inheritdoc}
supportsEncoding($format)
{@inheritdoc}
decode($data, $format, array $context = [])
{@inheritdoc}
supportsDecoding($format)
{@inheritdoc}
Details
XmlEncoder
getBaseEncoder()
Gets the base encoder instance.
setBaseEncoder(XmlEncoder $encoder)
Sets the base encoder instance.
encode($data, $format, array $context = [])
{@inheritdoc}
supportsEncoding($format)
{@inheritdoc}
decode($data, $format, array $context = [])
{@inheritdoc}
supportsDecoding($format)
{@inheritdoc}