PropertyMetadataContainerInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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;
  11. /**
  12. * A container for {@link PropertyMetadataInterface} instances.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. interface PropertyMetadataContainerInterface
  17. {
  18. /**
  19. * Check if there's any metadata attached to the given named property.
  20. *
  21. * @param string $property The property name.
  22. *
  23. * @return Boolean
  24. */
  25. public function hasPropertyMetadata($property);
  26. /**
  27. * Returns all metadata instances for the given named property.
  28. *
  29. * If your implementation does not support properties, simply throw an
  30. * exception in this method (for example a <tt>BadMethodCallException</tt>).
  31. *
  32. * @param string $property The property name.
  33. *
  34. * @return PropertyMetadataInterface[] A list of metadata instances. Empty if
  35. * no metadata exists for the property.
  36. */
  37. public function getPropertyMetadata($property);
  38. }