c00981b64f069676090a57d090f16be7bf71e1d7
[yaffs-website] / vendor / symfony / serializer / Mapping / ClassMetadataInterface.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 objects of specific class.
16  *
17  * Primarily, the metadata stores the set of attributes to serialize or deserialize.
18  *
19  * There may only exist one metadata for each attribute according to its name.
20  *
21  * @internal
22  *
23  * @author Kévin Dunglas <dunglas@gmail.com>
24  */
25 interface ClassMetadataInterface
26 {
27     /**
28      * Returns the name of the backing PHP class.
29      *
30      * @return string The name of the backing class
31      */
32     public function getName();
33
34     /**
35      * Adds an {@link AttributeMetadataInterface}.
36      *
37      * @param AttributeMetadataInterface $attributeMetadata
38      */
39     public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata);
40
41     /**
42      * Gets the list of {@link AttributeMetadataInterface}.
43      *
44      * @return AttributeMetadataInterface[]
45      */
46     public function getAttributesMetadata();
47
48     /**
49      * Merges a {@link ClassMetadataInterface} in the current one.
50      *
51      * @param ClassMetadataInterface $classMetadata
52      */
53     public function merge(ClassMetadataInterface $classMetadata);
54
55     /**
56      * Returns a {@link \ReflectionClass} instance for this class.
57      *
58      * @return \ReflectionClass
59      */
60     public function getReflectionClass();
61 }