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;
15 use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface;
18 * A container for validation metadata.
20 * Most importantly, the metadata stores the constraints against which an object
21 * and its properties should be validated.
23 * Additionally, the metadata stores whether objects should be validated
24 * against their class' metadata and whether traversable objects should be
27 * @author Bernhard Schussek <bschussek@gmail.com>
29 * @see CascadingStrategy
30 * @see TraversalStrategy
32 interface MetadataInterface extends LegacyMetadataInterface
35 * Returns the strategy for cascading objects.
37 * @return int The cascading strategy
39 * @see CascadingStrategy
41 public function getCascadingStrategy();
44 * Returns the strategy for traversing traversable objects.
46 * @return int The traversal strategy
48 * @see TraversalStrategy
50 public function getTraversalStrategy();
53 * Returns all constraints of this element.
55 * @return Constraint[] A list of Constraint instances
57 public function getConstraints();