File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,14 @@ There are several types of normalizers available:
737
737
:phpclass: `DateTime ` and :phpclass: `DateTimeImmutable `) into strings.
738
738
By default, it uses the `RFC3339 `_ format.
739
739
740
+ :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeZoneNormalizer `
741
+ This normalizer converts :phpclass: `DateTimeZone ` objects into strings that
742
+ represent the name of the timezone according to the `list of PHP timezones `_.
743
+
744
+ .. versionadded :: 4.3
745
+
746
+ The ``DateTimeZoneNormalizer `` was introduced in Symfony 4.3.
747
+
740
748
:class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DataUriNormalizer `
741
749
This normalizer converts :phpclass: `SplFileInfo ` objects into a data URI
742
750
string (``data:... ``) such that files can be embedded into serialized data.
@@ -1500,3 +1508,4 @@ Learn more
1500
1508
.. _`RFC 7807` : https://tools.ietf.org/html/rfc7807
1501
1509
.. _`Value Objects` : https://en.wikipedia.org/wiki/Value_object
1502
1510
.. _`API Platform` : https://api-platform.com
1511
+ .. _`list of PHP timezones` : https://www.php.net/manual/en/timezones.php
Original file line number Diff line number Diff line change @@ -61,13 +61,19 @@ As well as the following normalizers:
61
61
handle typical data objects
62
62
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeNormalizer ` for
63
63
objects implementing the :phpclass: `DateTimeInterface ` interface
64
+ * :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeZoneNormalizer ` for
65
+ :phpclass: `DateTimeZone ` objects
64
66
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DataUriNormalizer ` to
65
67
transform :phpclass: `SplFileInfo ` objects in `Data URIs `_
66
68
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ JsonSerializableNormalizer `
67
69
to deal with objects implementing the :phpclass: `JsonSerializable ` interface
68
70
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ ArrayDenormalizer ` to
69
71
denormalize arrays of objects using a format like `MyObject[] ` (note the `[] ` suffix)
70
72
73
+ .. versionadded :: 4.3
74
+
75
+ The ``DateTimeZoneNormalizer `` was introduced in Symfony 4.3.
76
+
71
77
Custom normalizers and/or encoders can also be loaded by tagging them as
72
78
:ref: `serializer.normalizer <reference-dic-tags-serializer-normalizer >` and
73
79
:ref: `serializer.encoder <reference-dic-tags-serializer-encoder >`. It's also
You can’t perform that action at this time.
0 commit comments