@@ -11,17 +11,14 @@ The Serializer Component
11
11
In order to do so, the Serializer component follows the following
12
12
simple schema.
13
13
14
- .. _component-serializer-encoders :
15
- .. _component-serializer-normalizers :
16
-
17
14
.. image :: /_images/components/serializer/serializer_workflow.png
18
15
19
16
As you can see in the picture above, an array is used as a man in
20
17
the middle. This way, Encoders will only deal with turning specific
21
18
**formats ** into **arrays ** and vice versa. The same way, Normalizers
22
19
will deal with turning specific **objects ** into **arrays ** and vice versa.
23
20
24
- Serialization is a complex topic. This component may not cover all your use cases out of the box,
21
+ Serialization is a complex topic. This component may not cover all your use cases out of the box,
25
22
but it can be useful for developing tools to serialize and deserialize your objects.
26
23
27
24
Installation
@@ -503,6 +500,8 @@ When serializing, you can set a callback to format a specific object property::
503
500
$serializer->serialize($person, 'json');
504
501
// Output: {"name":"cordoval", "age": 34, "createdAt": "2014-03-22T09:43:12-0500"}
505
502
503
+ .. _component-serializer-normalizers :
504
+
506
505
Normalizers
507
506
-----------
508
507
@@ -562,6 +561,8 @@ There are several types of normalizers available:
562
561
This normalizer converts :phpclass: `SplFileInfo ` objects into a data URI
563
562
string (``data:... ``) such that files can be embedded into serialized data.
564
563
564
+ .. _component-serializer-encoders :
565
+
565
566
Encoders
566
567
--------
567
568
0 commit comments