PropertyMetadataInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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\Validator\Mapping;
  11. /**
  12. * Stores all metadata needed for validating the value of a class property.
  13. *
  14. * Most importantly, the metadata stores the constraints against which the
  15. * property's value should be validated.
  16. *
  17. * Additionally, the metadata stores whether objects stored in the property
  18. * should be validated against their class' metadata and whether traversable
  19. * objects should be traversed or not.
  20. *
  21. * @author Bernhard Schussek <bschussek@gmail.com>
  22. *
  23. * @see MetadataInterface
  24. * @see CascadingStrategy
  25. * @see TraversalStrategy
  26. */
  27. interface PropertyMetadataInterface extends MetadataInterface
  28. {
  29. /**
  30. * Returns the name of the property.
  31. *
  32. * @return string The property name
  33. */
  34. public function getPropertyName();
  35. /**
  36. * Extracts the value of the property from the given container.
  37. *
  38. * @param mixed $containingValue The container to extract the property value from
  39. *
  40. * @return mixed The value of the property
  41. */
  42. public function getPropertyValue($containingValue);
  43. }