XmlEncoder
class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface
Encodes XML data.
Methods
Construct new XmlEncoder and allow to change the root node element name.
Encodes data into the given format.
Decodes a string into PHP data.
Checks whether the serializer can encode to given format.
Checks whether the deserializer can decode from given format.
Sets the root node name.
Returns the root node name.
Details
in SerializerAwareEncoder at line line 29
setSerializer(SerializerInterface $serializer)
Sets the owning Serializer object.
at line line 39
__construct(string $rootNodeName = 'response')
Construct new XmlEncoder and allow to change the root node element name.
at line line 47
scalar
encode(mixed $data, string $format, array $context = array())
Encodes data into the given format.
at line line 73
mixed
decode(string $data, string $format, array $context = array())
Decodes a string into PHP data.
at line line 139
bool
supportsEncoding(string $format)
Checks whether the serializer can encode to given format.
at line line 147
bool
supportsDecoding(string $format)
Checks whether the deserializer can decode from given format.
at line line 157
setRootNodeName(string $name)
Sets the root node name.
at line line 167
string
getRootNodeName()
Returns the root node name.