class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface
Encodes XML data.
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. |
Sets the owning Serializer object.
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.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/Serializer/Encoder/XmlEncoder.html