Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
javiereguiluz left a comment
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)
| ``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.
xabbuh commentedJan 10, 2017
amoiraud commentedJan 12, 2017
Hi@xabbuh ! If you can take care of them when merging that would be great, I'm not really fluent in english :/ Thanks |
javiereguiluz commentedOct 11, 2017
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 paramAdd documentation for XmlEncoder context paramRelated to :symfony/symfony#20524Thisfixes#7227Commits-------5e23045 Minor tweaksadbc7b2 Minor rewords2dc6ed3 Minor syntax issue6050370 Minor syntax issues and some rewordings2f3cf02 Correcting my bad english with a bilingual friend60c7657 Add XmlEncoder documentation with $context available options04af434 erratumc83e59d Add XmlEncoder documentation with $context available options
Uh oh!
There was an error while loading.Please reload this page.
Add documentation for XmlEncoder context param
Related to :symfony/symfony#20524
Thisfixes#7227