@@ 377-393 (lines=17) @@ | ||
374 | * |
|
375 | * @return array|null |
|
376 | */ |
|
377 | public function getSerializationContext() |
|
378 | { |
|
379 | if (!$this->annotations->exists(SerializationContext::NAME)) { |
|
380 | return null; |
|
381 | } |
|
382 | ||
383 | /** @var SerializationContext $contextAnnotation */ |
|
384 | $contextAnnotation = $this->annotations->get(SerializationContext::NAME); |
|
385 | ||
386 | return [ |
|
387 | 'groups' => $contextAnnotation->getGroups(), |
|
388 | 'version' => $contextAnnotation->getVersion(), |
|
389 | 'serializeNull' => $contextAnnotation->getSerializeNull(), |
|
390 | 'enableMaxDepthChecks' => $contextAnnotation->getEnableMaxDepthChecks(), |
|
391 | 'attributes' => $contextAnnotation->getAttributes(), |
|
392 | ]; |
|
393 | } |
|
394 | ||
395 | /** |
|
396 | * Get JMS Deserialization context |
|
@@ 400-417 (lines=18) @@ | ||
397 | * |
|
398 | * @return array|null |
|
399 | */ |
|
400 | public function getDeserializationContext() |
|
401 | { |
|
402 | if (!$this->annotations->exists(DeserializationContext::NAME)) { |
|
403 | return null; |
|
404 | } |
|
405 | ||
406 | /** @var DeserializationContext $contextAnnotation */ |
|
407 | $contextAnnotation = $this->annotations->get(DeserializationContext::NAME); |
|
408 | ||
409 | return [ |
|
410 | 'groups' => $contextAnnotation->getGroups(), |
|
411 | 'version' => $contextAnnotation->getVersion(), |
|
412 | 'serializeNull' => $contextAnnotation->getSerializeNull(), |
|
413 | 'enableMaxDepthChecks' => $contextAnnotation->getEnableMaxDepthChecks(), |
|
414 | 'attributes' => $contextAnnotation->getAttributes(), |
|
415 | 'depth' => $contextAnnotation->getDepth(), |
|
416 | ]; |
|
417 | } |
|
418 | ||
419 | /** |
|
420 | * Get the expected return |