1 | <?php |
||
8 | class Serializer |
||
9 | { |
||
10 | /** @var SerializableClassMapper */ |
||
11 | private $classMapper; |
||
12 | |||
13 | /** @var HydratorFactory */ |
||
14 | private $hydratorFactory; |
||
15 | |||
16 | /** @var DataFormatter */ |
||
17 | private $dataFormatter; |
||
18 | |||
19 | /** @var InstantiatorInterface */ |
||
20 | private $instantiator; |
||
21 | |||
22 | /** |
||
23 | * Constructor. |
||
24 | * |
||
25 | * @param SerializableClassMapper $classMapper |
||
26 | * @param HydratorFactory $hydratorFactory |
||
27 | * @param DataFormatter $dataFormatter |
||
28 | * @param InstantiatorInterface $instantiator |
||
29 | */ |
||
30 | 9 | public function __construct( |
|
41 | |||
42 | /** |
||
43 | * @param mixed $object |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | 6 | public function serialize($object) |
|
55 | |||
56 | /** |
||
57 | * @param mixed $object |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | 3 | private function innerSerialize($object) |
|
76 | |||
77 | /** |
||
78 | * @param object $object |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | 3 | private function serializeObject($object) |
|
93 | |||
94 | /** |
||
95 | * @param array $serializedObject |
||
96 | * |
||
97 | * @return mixed |
||
98 | */ |
||
99 | 3 | public function deserialize(array $serializedObject) |
|
103 | |||
104 | /** |
||
105 | * @param mixed $serializedObject |
||
106 | * |
||
107 | * @return mixed |
||
108 | */ |
||
109 | 3 | private function recursiveDeserialize($serializedObject) |
|
124 | |||
125 | /** |
||
126 | * @param array $serializedObject |
||
127 | * |
||
128 | * @return object |
||
129 | */ |
||
130 | 3 | private function deserializeObject(array $serializedObject) |
|
146 | } |
||
147 |