-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add documentation for XmlEncoder context param #7231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@amoiraud thanks for providing this doc!
components/serializer.rst
Outdated
The array keys beginning with ``@`` are considered XML attributes:: | ||
|
||
$encoder = new XmlEncoder(); | ||
$encoder->encode(array('foo' => array('@bar' => 'value'))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the XmlEncoder class won't be called directly. It will be called when using $serializer->serialize($data, 'xml', $context)
components/serializer.rst
Outdated
``xml_root_node_name`` | ||
Change the root node name (default: ``response``). | ||
|
||
``remove_empty_tags`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context options related to the XML encoder should not be documented in the main chapter of the serializer doc IMO (but this should be decided by the doc team).
And if we document them (which is a good idea), context options supported by encoders for other formats should be documented too.
Hi @xabbuh ! If you can take care of them when merging that would be great, I'm not really fluent in english :/ Thanks |
Thanks! |
… javiereguiluz) This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #7231). Discussion ---------- Add documentation for XmlEncoder context param Add documentation for XmlEncoder context param Related to : symfony/symfony#20524 This fixes #7227 Commits ------- 5e23045 Minor tweaks adbc7b2 Minor rewords 2dc6ed3 Minor syntax issue 6050370 Minor syntax issues and some rewordings 2f3cf02 Correcting my bad english with a bilingual friend 60c7657 Add XmlEncoder documentation with $context available options 04af434 erratum c83e59d Add XmlEncoder documentation with $context available options
Add documentation for XmlEncoder context param
Related to : symfony/symfony#20524
This fixes #7227