Skip to content

Commit 318cfaa

Browse files
Added an example of the mapping between methods and properties
1 parent 549ee79 commit 318cfaa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/serializer.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ There are several types of normalizers available:
512512
calling the constructor during the denormalization process.
513513

514514
Objects are normalized to a map of property names (method name stripped of
515-
the "get"/"set"/"has"/"remove" prefix) to property
516-
values.
515+
the get/set/has/remove prefix) to property values. For example:
516+
``getDateOfBirth()`` is mapped to the ``DateOfBirth`` property.
517517

518518
The ``ObjectNormalizer`` is the most powerful normalizer. It is configured by
519519
default when using the Symfony Standard Edition with the serializer enabled.
@@ -524,7 +524,8 @@ There are several types of normalizers available:
524524
the constructor and the "setters" (public methods starting with "set").
525525

526526
Objects are normalized to a map of property names (method name stripped of
527-
the "get" prefix) to property values.
527+
the "get" prefix) to property values. For example: ``getDateOfBirth()`` is
528+
mapped to the ``DateOfBirth`` property.
528529

529530
:class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`
530531
This normalizer directly reads and writes public properties as well as

0 commit comments

Comments
 (0)