comparison vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 1fec387a4317
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
11 11
12 namespace Symfony\Component\Serializer\Normalizer; 12 namespace Symfony\Component\Serializer\Normalizer;
13 13
14 use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; 14 use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException;
15 use Symfony\Component\Serializer\Encoder\JsonEncoder; 15 use Symfony\Component\Serializer\Encoder\JsonEncoder;
16 use Symfony\Component\Serializer\Exception\CircularReferenceException;
17 use Symfony\Component\Serializer\Exception\LogicException; 16 use Symfony\Component\Serializer\Exception\LogicException;
18 use Symfony\Component\Serializer\Exception\UnexpectedValueException; 17 use Symfony\Component\Serializer\Exception\UnexpectedValueException;
19 use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; 18 use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
20 use Symfony\Component\PropertyInfo\Type; 19 use Symfony\Component\PropertyInfo\Type;
21 use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface; 20 use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface;
50 return is_object($data) && !$data instanceof \Traversable; 49 return is_object($data) && !$data instanceof \Traversable;
51 } 50 }
52 51
53 /** 52 /**
54 * {@inheritdoc} 53 * {@inheritdoc}
55 *
56 * @throws CircularReferenceException
57 */ 54 */
58 public function normalize($object, $format = null, array $context = array()) 55 public function normalize($object, $format = null, array $context = array())
59 { 56 {
60 if (!isset($context['cache_key'])) { 57 if (!isset($context['cache_key'])) {
61 $context['cache_key'] = $this->getCacheKey($format, $context); 58 $context['cache_key'] = $this->getCacheKey($format, $context);