class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface
Encodes XML data.
Methods
setSerializer(SerializerInterface $serializer) Sets the owning Serializer object. | from SerializerAwareEncoder | |
__construct(string $rootNodeName = 'response', int|null $loadOptions = null) Construct new XmlEncoder and allow to change the root node element name. | ||
scalar | encode(mixed $data, string $format, array $context = array()) Encodes data into the given format. | |
mixed | decode(string $data, string $format, array $context = array()) Decodes a string into PHP data. | |
bool | supportsEncoding(string $format) Checks whether the serializer can encode to given format. | |
bool | supportsDecoding(string $format) Checks whether the deserializer can decode from given format. | |
setRootNodeName(string $name) Sets the root node name. | ||
string | getRootNodeName() Returns the root node name. |
Details
setSerializer(SerializerInterface $serializer)
Sets the owning Serializer object.
__construct(string $rootNodeName = 'response', int|null $loadOptions = null)
Construct new XmlEncoder and allow to change the root node element name.
scalar encode(mixed $data, string $format, array $context = array())
Encodes data into the given format.
mixed decode(string $data, string $format, array $context = array())
Decodes a string into PHP data.
bool supportsEncoding(string $format)
Checks whether the serializer can encode to given format.
bool supportsDecoding(string $format)
Checks whether the deserializer can decode from given format.
setRootNodeName(string $name)
Sets the root node name.
string getRootNodeName()
Returns the root node name.
Please login to continue.