Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed

Conversation

@amoiraud
Copy link
Contributor

@amoiraudamoiraud commentedDec 7, 2016
edited by javiereguiluz
Loading

Add documentation for XmlEncoder context param

Related to :symfony/symfony#20524
Thisfixes#7227

Copy link
Member

@javiereguiluzjaviereguiluz left a 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!

The array keys beginning with ``@`` are considered XML attributes::

$encoder = new XmlEncoder();
$encoder->encode(array('foo' => array('@bar' => 'value')));
Copy link
Member

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``
Copy link
Member

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
Copy link
Member

@amoiraud Sorry for the delay here. Do you think you can address@stof's comments or should we take care of them when merging?

Status: Needs work

@amoiraud
Copy link
ContributorAuthor

Hi@xabbuh !

If you can take care of them when merging that would be great, I'm not really fluent in english :/

Thanks

@javiereguiluz
Copy link
Member

Thanks!

@javiereguiluzjaviereguiluz added this to the3.3 milestoneJan 5, 2018
javiereguiluz added a commit that referenced this pull requestJan 5, 2018
… 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

+1 more reviewer

@stofstofstof left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

[Serializer] Add documentation for "Allow removing empty tags in generated XML"

5 participants

@amoiraud@xabbuh@javiereguiluz@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp