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 public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata);
40 * Gets the list of {@link AttributeMetadataInterface}.
42 * @return AttributeMetadataInterface[]
44 public function getAttributesMetadata();
47 * Merges a {@link ClassMetadataInterface} in the current one.
49 public function merge(self $classMetadata);
52 * Returns a {@link \ReflectionClass} instance for this class.
54 * @return \ReflectionClass
56 public function getReflectionClass();