Drupal investigation

ClassMetadataInterface.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Serializer\Mapping;
  11. /**
  12. * Stores metadata needed for serializing and deserializing objects of specific class.
  13. *
  14. * Primarily, the metadata stores the set of attributes to serialize or deserialize.
  15. *
  16. * There may only exist one metadata for each attribute according to its name.
  17. *
  18. * @internal
  19. *
  20. * @author Kévin Dunglas <dunglas@gmail.com>
  21. */
  22. interface ClassMetadataInterface
  23. {
  24. /**
  25. * Returns the name of the backing PHP class.
  26. *
  27. * @return string The name of the backing class
  28. */
  29. public function getName();
  30. /**
  31. * Adds an {@link AttributeMetadataInterface}.
  32. *
  33. * @param AttributeMetadataInterface $attributeMetadata
  34. */
  35. public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata);
  36. /**
  37. * Gets the list of {@link AttributeMetadataInterface}.
  38. *
  39. * @return AttributeMetadataInterface[]
  40. */
  41. public function getAttributesMetadata();
  42. /**
  43. * Merges a {@link ClassMetadataInterface} in the current one.
  44. *
  45. * @param ClassMetadataInterface $classMetadata
  46. */
  47. public function merge(ClassMetadataInterface $classMetadata);
  48. /**
  49. * Returns a {@link \ReflectionClass} instance for this class.
  50. *
  51. * @return \ReflectionClass
  52. */
  53. public function getReflectionClass();
  54. }