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

Appearance settings

Commit 7da700f

Browse filesBrowse files
committed
Merge branch '5.1' into 5.2
* 5.1: Fixed a Serializer example
2 parents 850f022 + 4e88dc5 commit 7da700f
Copy full SHA for 7da700f

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎components/serializer.rst

Copy file name to clipboardExpand all lines: components/serializer.rst
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,10 @@ Option Description De
898898
``csv_key_separator`` Sets the separator for array's keys during its ``.``
899899
flattening
900900
``csv_headers`` Sets the order of the header and data columns
901-
E.g.: ``serialize(['c' => 3,'a' => 1,'b' => 2],
902-
'csv', ['csv_headers' => ['a', 'b', 'c']]);``
903-
returns ``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
901+
E.g.: if ``$data = ['c' => 3, 'a' => 1, 'b' => 2]``
902+
and ``$options = ['csv_headers' => ['a', 'b', 'c']]``
903+
then ``serialize($data, 'csv', $options)`` returns
904+
``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
904905
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
905906
with a ``\t`` character
906907
``as_collection`` Always returns results as a collection, even if only

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.