4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Serializer\Mapping;
15 * Stores metadata needed for serializing and deserializing attributes.
17 * Primarily, the metadata stores serialization groups.
21 * @author Kévin Dunglas <dunglas@gmail.com>
23 interface AttributeMetadataInterface
26 * Gets the attribute name.
30 public function getName();
33 * Adds this attribute to the given group.
35 * @param string $group
37 public function addGroup($group);
40 * Gets groups of this attribute.
44 public function getGroups();
47 * Sets the serialization max depth for this attribute.
49 * @param int|null $maxDepth
51 public function setMaxDepth($maxDepth);
54 * Gets the serialization max depth for this attribute.
58 public function getMaxDepth();
61 * Merges an {@see AttributeMetadataInterface} with in the current one.
63 public function merge(AttributeMetadataInterface $attributeMetadata);