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

Commitc9036cd

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: Remove duplicate normalizers docs
2 parentsed0404f +bd06952 commitc9036cd

File tree

4 files changed

+19
-55
lines changed

4 files changed

+19
-55
lines changed

‎components/serializer.rst‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,8 @@ The Serializer component provides several built-in normalizers:
834834
:class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`
835835
This normalizer directly reads and writes public properties as well as
836836
**private and protected** properties (from both the class and all of its
837-
parent classes). It supports calling the constructor during the denormalization process.
837+
parent classes) by using `PHP reflection`_. It supports calling the constructor
838+
during the denormalization process.
838839

839840
Objects are normalized to a map of property names to property values.
840841

@@ -861,7 +862,7 @@ The Serializer component provides several built-in normalizers:
861862
represent the name of the timezone according to the `list of PHP timezones`_.
862863

863864
:class:`Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer`
864-
This normalizer converts:phpclass:`SplFileInfo` objects into a data URI
865+
This normalizer converts:phpclass:`SplFileInfo` objects into a`data URI`_
865866
string (``data:...``) such that files can be embedded into serialized data.
866867

867868
:class:`Symfony\\Component\\Serializer\\Normalizer\\DateIntervalNormalizer`
@@ -1762,3 +1763,5 @@ Learn more
17621763
.. _`API Platform`:https://api-platform.com
17631764
.. _`list of PHP timezones`:https://www.php.net/manual/en/timezones.php
17641765
.. _`RFC 4122`:https://tools.ietf.org/html/rfc4122
1766+
.. _`PHP reflection`:https://php.net/manual/en/book.reflection.php
1767+
.. _`data URI`:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

‎serializer.rst‎

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,19 @@ Encoders supporting the following formats are enabled:
7070

7171
As well as the following normalizers:
7272

73-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer` to
74-
handle typical data objects
75-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeNormalizer` for
76-
objects implementing the:phpclass:`DateTimeInterface` interface
77-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeZoneNormalizer` for
78-
:phpclass:`DateTimeZone` objects
73+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer`
74+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeNormalizer`
75+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeZoneNormalizer`
7976
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateIntervalNormalizer`
80-
for:phpclass:`DateInterval` objects
81-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer` to
82-
transform:phpclass:`SplFileInfo` objects in `Data URIs`_
83-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\FormErrorNormalizer` for
84-
objects implementing the:class:`Symfony\\Component\\Form\\FormInterface` to
85-
normalize form errors.
77+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\FormErrorNormalizer`
78+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer`
8679
*:class:`Symfony\\Component\\Serializer\\Normalizer\\JsonSerializableNormalizer`
87-
to deal with objects implementing the:phpclass:`JsonSerializable` interface
88-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ArrayDenormalizer` to
89-
denormalize arrays of objects using a notation like ``MyObject[]`` (note the ``[]`` suffix)
90-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ConstraintViolationListNormalizer` for objects implementing the:class:`Symfony\\Component\\Validator\\ConstraintViolationListInterface` interface
91-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ProblemNormalizer` for:class:`Symfony\\Component\\ErrorHandler\\Exception\\FlattenException` objects
80+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ArrayDenormalizer`
81+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ConstraintViolationListNormalizer`
82+
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ProblemNormalizer`
9283

93-
Custom normalizers and/or encoders can also be loaded by tagging them as
84+
Other:ref:`built-in normalizers<component-serializer-normalizers>` and
85+
custom normalizers and/or encoders can also be loaded by tagging them as
9486
:ref:`serializer.normalizer<reference-dic-tags-serializer-normalizer>` and
9587
:ref:`serializer.encoder<reference-dic-tags-serializer-encoder>`. It's also
9688
possible to set the priority of the tag in order to decide the matching order.
@@ -101,7 +93,7 @@ possible to set the priority of the tag in order to decide the matching order.
10193
``DateTime`` or ``DateTimeImmutable`` classes to avoid excessive memory
10294
usage and exposing internal details.
10395

104-
Here is an example on how to load the
96+
Here is an example on how to load the built-in
10597
:class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`, a
10698
faster alternative to the `ObjectNormalizer` when data objects always use
10799
getters (``getXxx()``), issers (``isXxx()``) or hassers (``hasXxx()``) to read
@@ -328,4 +320,3 @@ take a look at how this bundle works.
328320
.. _`GraphQL`:https://graphql.org
329321
.. _`JSON:API`:https://jsonapi.org
330322
.. _`HAL`:http://stateless.co/hal_specification.html
331-
.. _`Data URIs`:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

‎serializer/custom_normalizer.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to Create your Custom Normalizer
66

77
The:doc:`Serializer component</components/serializer>` uses
88
normalizers to transform any data into an array. The component provides several
9-
:doc:`built-in normalizers</serializer/normalizers>` but you may need to create
9+
:ref:`built-in normalizers<component-serializer-normalizers>` but you may need to create
1010
your own normalizer to transform an unsupported data structure.
1111

1212
Creating a New Normalizer

‎serializer/normalizers.rst‎

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,5 @@ Normalizers are enabled in the serializer passing them as its first argument::
2121
Built-in Normalizers
2222
--------------------
2323

24-
Symfony includes the following normalizers but you can also
25-
:doc:`create your own normalizer</serializer/custom_normalizer>`:
26-
27-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer` to
28-
normalize PHP object using the:doc:`PropertyAccess component</components/property_access>`;
29-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeZoneNormalizer`
30-
for:phpclass:`DateTimeZone` objects;
31-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeNormalizer` for
32-
objects implementing the:phpclass:`DateTimeInterface` interface;
33-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DateIntervalNormalizer`
34-
for:phpclass:`DateInterval` objects;
35-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer` to
36-
transform:phpclass:`SplFileInfo` objects in `Data URIs`_;
37-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\CustomNormalizer` to
38-
normalize PHP object using an object that implements
39-
:class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizableInterface`;
40-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\FormErrorNormalizer` for
41-
objects implementing the:class:`Symfony\\Component\\Form\\FormInterface` to
42-
normalize form errors;
43-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer` to
44-
normalize PHP object using the getter and setter methods of the object;
45-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer` to
46-
normalize PHP object using `PHP reflection`_;
47-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ConstraintViolationListNormalizer` for objects implementing the:class:`Symfony\\Component\\Validator\\ConstraintViolationListInterface` interface;
48-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\ProblemNormalizer` for:class:`Symfony\\Component\\ErrorHandler\\Exception\\FlattenException` objects
49-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\JsonSerializableNormalizer`
50-
to deal with objects implementing the:phpclass:`JsonSerializable` interface;
51-
*:class:`Symfony\\Component\\Serializer\\Normalizer\\UidNormalizer` converts objects that implement:class:`Symfony\\Component\\Uid\\AbstractUid` into strings and denormalizes uuid or ulid strings to:class:`Symfony\\Component\\Uid\\Uuid` or:class:`Symfony\\Component\\Uid\\Ulid`.
52-
53-
54-
.. _`Data URIs`:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
55-
.. _`PHP reflection`:https://php.net/manual/en/book.reflection.php
24+
Symfony includes several types of:ref:`built-in normalizers<component-serializer-normalizers>`
25+
but you can also:doc:`create your own normalizer</serializer/custom_normalizer>`.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp