Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 /*
|
Chris@0
|
4 * This file is part of the Symfony package.
|
Chris@0
|
5 *
|
Chris@0
|
6 * (c) Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
7 *
|
Chris@0
|
8 * For the full copyright and license information, please view the LICENSE
|
Chris@0
|
9 * file that was distributed with this source code.
|
Chris@0
|
10 */
|
Chris@0
|
11
|
Chris@0
|
12 namespace Symfony\Component\Validator\Mapping;
|
Chris@0
|
13
|
Chris@0
|
14 use Symfony\Component\Validator\Constraint;
|
Chris@0
|
15
|
Chris@0
|
16 /**
|
Chris@0
|
17 * A container for validation metadata.
|
Chris@0
|
18 *
|
Chris@0
|
19 * Most importantly, the metadata stores the constraints against which an object
|
Chris@0
|
20 * and its properties should be validated.
|
Chris@0
|
21 *
|
Chris@0
|
22 * Additionally, the metadata stores whether objects should be validated
|
Chris@0
|
23 * against their class' metadata and whether traversable objects should be
|
Chris@0
|
24 * traversed or not.
|
Chris@0
|
25 *
|
Chris@0
|
26 * @author Bernhard Schussek <bschussek@gmail.com>
|
Chris@0
|
27 *
|
Chris@0
|
28 * @see CascadingStrategy
|
Chris@0
|
29 * @see TraversalStrategy
|
Chris@0
|
30 */
|
Chris@0
|
31 interface MetadataInterface
|
Chris@0
|
32 {
|
Chris@0
|
33 /**
|
Chris@0
|
34 * Returns the strategy for cascading objects.
|
Chris@0
|
35 *
|
Chris@0
|
36 * @return int The cascading strategy
|
Chris@0
|
37 *
|
Chris@0
|
38 * @see CascadingStrategy
|
Chris@0
|
39 */
|
Chris@0
|
40 public function getCascadingStrategy();
|
Chris@0
|
41
|
Chris@0
|
42 /**
|
Chris@0
|
43 * Returns the strategy for traversing traversable objects.
|
Chris@0
|
44 *
|
Chris@0
|
45 * @return int The traversal strategy
|
Chris@0
|
46 *
|
Chris@0
|
47 * @see TraversalStrategy
|
Chris@0
|
48 */
|
Chris@0
|
49 public function getTraversalStrategy();
|
Chris@0
|
50
|
Chris@0
|
51 /**
|
Chris@0
|
52 * Returns all constraints of this element.
|
Chris@0
|
53 *
|
Chris@0
|
54 * @return Constraint[] A list of Constraint instances
|
Chris@0
|
55 */
|
Chris@0
|
56 public function getConstraints();
|
Chris@0
|
57
|
Chris@0
|
58 /**
|
Chris@0
|
59 * Returns all constraints for a given validation group.
|
Chris@0
|
60 *
|
Chris@0
|
61 * @param string $group The validation group
|
Chris@0
|
62 *
|
Chris@0
|
63 * @return Constraint[] A list of constraint instances
|
Chris@0
|
64 */
|
Chris@0
|
65 public function findConstraints($group);
|
Chris@0
|
66 }
|