@@ 65-72 (lines=8) @@ | ||
62 | return $data instanceof Activity; |
|
63 | } |
|
64 | ||
65 | private function normalizeAttribute($value, $format = null, array $context = array()) |
|
66 | { |
|
67 | if (!$this->serializer instanceof NormalizerInterface) { |
|
68 | throw new LogicException('Cannot normalize attribute because the injected serializer is not a normalizer'); |
|
69 | } |
|
70 | ||
71 | return $this->serializer->normalize($value, $format, $context); |
|
72 | } |
|
73 | } |
|
74 |
@@ 35-42 (lines=8) @@ | ||
32 | $this->serializer = $serializer; |
|
33 | } |
|
34 | ||
35 | protected function normalizeAttribute($value, $format = null, array $context = array()) |
|
36 | { |
|
37 | if (!$this->serializer instanceof NormalizerInterface) { |
|
38 | throw new LogicException('Cannot normalize attribute because the injected serializer is not a normalizer'); |
|
39 | } |
|
40 | ||
41 | return $this->serializer->normalize($value, $format, $context); |
|
42 | } |
|
43 | ||
44 | protected function denormalizeData($data, $type, $format = null, array $context = array()) |
|
45 | { |