X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fserializer%2FMapping%2FAttributeMetadata.php;fp=vendor%2Fsymfony%2Fserializer%2FMapping%2FAttributeMetadata.php;h=b9daf5d25b82996f3ba3d129da73e4c083fee515;hp=7a1d3db94a8096a3ca3822367e480ec958dfa2a2;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/symfony/serializer/Mapping/AttributeMetadata.php b/vendor/symfony/serializer/Mapping/AttributeMetadata.php index 7a1d3db94..b9daf5d25 100644 --- a/vendor/symfony/serializer/Mapping/AttributeMetadata.php +++ b/vendor/symfony/serializer/Mapping/AttributeMetadata.php @@ -36,6 +36,15 @@ class AttributeMetadata implements AttributeMetadataInterface */ public $groups = array(); + /** + * @var int|null + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getMaxDepth()} instead. + */ + public $maxDepth; + /** * Constructs a metadata for the given attribute. * @@ -72,6 +81,22 @@ class AttributeMetadata implements AttributeMetadataInterface return $this->groups; } + /** + * {@inheritdoc} + */ + public function setMaxDepth($maxDepth) + { + $this->maxDepth = $maxDepth; + } + + /** + * {@inheritdoc} + */ + public function getMaxDepth() + { + return $this->maxDepth; + } + /** * {@inheritdoc} */ @@ -80,6 +105,11 @@ class AttributeMetadata implements AttributeMetadataInterface foreach ($attributeMetadata->getGroups() as $group) { $this->addGroup($group); } + + // Overwrite only if not defined + if (null === $this->maxDepth) { + $this->maxDepth = $attributeMetadata->getMaxDepth(); + } } /** @@ -89,6 +119,6 @@ class AttributeMetadata implements AttributeMetadataInterface */ public function __sleep() { - return array('name', 'groups'); + return array('name', 'groups', 'maxDepth'); } }