|
@@ 28-36 (lines=9) @@
|
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
/** {@inheritdoc} */ |
| 28 |
|
public function serialize($data, $format, array $context = []) |
| 29 |
|
{ |
| 30 |
|
$jmsContext = SerializationContext::create(); |
| 31 |
|
if (array_key_exists('groups', $context)) { |
| 32 |
|
$jmsContext->setGroups($context['groups']); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
return $this->serializer->serialize($data, $format, $jmsContext); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
/** {@inheritdoc} */ |
| 39 |
|
public function deserialize($data, $type, $format, array $context = []) |
|
@@ 39-47 (lines=9) @@
|
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
/** {@inheritdoc} */ |
| 39 |
|
public function deserialize($data, $type, $format, array $context = []) |
| 40 |
|
{ |
| 41 |
|
$jmsContext = DeserializationContext::create(); |
| 42 |
|
if (array_key_exists('groups', $context)) { |
| 43 |
|
$jmsContext->setGroups($context['groups']); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
$this->serializer->deserialize($data, $type, $format, $jmsContext); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
/** {@inheritdoc} */ |
| 50 |
|
public function normalize($object, $format = null, array $context = []) |