d9a15d5ac0de5c74437cfc1a923bf0c2cc0418bc
[yaffs-website] / vendor / symfony / serializer / Mapping / AttributeMetadataInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Serializer\Mapping;
13
14 /**
15  * Stores metadata needed for serializing and deserializing attributes.
16  *
17  * Primarily, the metadata stores serialization groups.
18  *
19  * @internal
20  *
21  * @author Kévin Dunglas <dunglas@gmail.com>
22  */
23 interface AttributeMetadataInterface
24 {
25     /**
26      * Gets the attribute name.
27      *
28      * @return string
29      */
30     public function getName();
31
32     /**
33      * Adds this attribute to the given group.
34      *
35      * @param string $group
36      */
37     public function addGroup($group);
38
39     /**
40      * Gets groups of this attribute.
41      *
42      * @return string[]
43      */
44     public function getGroups();
45
46     /**
47      * Sets the serialization max depth for this attribute.
48      *
49      * @param int|null $maxDepth
50      */
51     public function setMaxDepth($maxDepth);
52
53     /**
54      * Gets the serialization max depth for this attribute.
55      *
56      * @return int|null
57      */
58     public function getMaxDepth();
59
60     /**
61      * Merges an {@see AttributeMetadataInterface} with in the current one.
62      */
63     public function merge(self $attributeMetadata);
64 }