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\Validator\Mapping;
14 use Symfony\Component\Validator\Constraint;
17 * A container for validation metadata.
19 * Most importantly, the metadata stores the constraints against which an object
20 * and its properties should be validated.
22 * Additionally, the metadata stores whether objects should be validated
23 * against their class' metadata and whether traversable objects should be
26 * @author Bernhard Schussek <bschussek@gmail.com>
28 * @see CascadingStrategy
29 * @see TraversalStrategy
31 interface MetadataInterface
34 * Returns the strategy for cascading objects.
36 * @return int The cascading strategy
38 * @see CascadingStrategy
40 public function getCascadingStrategy();
43 * Returns the strategy for traversing traversable objects.
45 * @return int The traversal strategy
47 * @see TraversalStrategy
49 public function getTraversalStrategy();
52 * Returns all constraints of this element.
54 * @return Constraint[] A list of Constraint instances
56 public function getConstraints();
59 * Returns all constraints for a given validation group.
61 * @param string $group The validation group
63 * @return Constraint[] A list of constraint instances
65 public function findConstraints($group);