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 objects of specific class.
17 * Primarily, the metadata stores the set of attributes to serialize or deserialize.
19 * There may only exist one metadata for each attribute according to its name.
23 * @author Kévin Dunglas <dunglas@gmail.com>
25 interface ClassMetadataInterface
28 * Returns the name of the backing PHP class.
30 * @return string The name of the backing class
32 public function getName();
35 * Adds an {@link AttributeMetadataInterface}.
37 * @param AttributeMetadataInterface $attributeMetadata
39 public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata);
42 * Gets the list of {@link AttributeMetadataInterface}.
44 * @return AttributeMetadataInterface[]
46 public function getAttributesMetadata();
49 * Merges a {@link ClassMetadataInterface} in the current one.
51 * @param ClassMetadataInterface $classMetadata
53 public function merge(ClassMetadataInterface $classMetadata);
56 * Returns a {@link \ReflectionClass} instance for this class.
58 * @return \ReflectionClass
60 public function getReflectionClass();