6bb30274e3428bc5474035d8186ebb3d6457f4eb
[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      * Merges an {@see AttributeMetadataInterface} with in the current one.
48      *
49      * @param AttributeMetadataInterface $attributeMetadata
50      */
51     public function merge(AttributeMetadataInterface $attributeMetadata);
52 }