Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Validator\Mapping; Chris@0: Chris@0: use Symfony\Component\Validator\Constraint; Chris@0: Chris@0: /** Chris@0: * A container for validation metadata. Chris@0: * Chris@0: * Most importantly, the metadata stores the constraints against which an object Chris@0: * and its properties should be validated. Chris@0: * Chris@0: * Additionally, the metadata stores whether objects should be validated Chris@0: * against their class' metadata and whether traversable objects should be Chris@0: * traversed or not. Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: * Chris@0: * @see CascadingStrategy Chris@0: * @see TraversalStrategy Chris@0: */ Chris@0: interface MetadataInterface Chris@0: { Chris@0: /** Chris@0: * Returns the strategy for cascading objects. Chris@0: * Chris@0: * @return int The cascading strategy Chris@0: * Chris@0: * @see CascadingStrategy Chris@0: */ Chris@0: public function getCascadingStrategy(); Chris@0: Chris@0: /** Chris@0: * Returns the strategy for traversing traversable objects. Chris@0: * Chris@0: * @return int The traversal strategy Chris@0: * Chris@0: * @see TraversalStrategy Chris@0: */ Chris@0: public function getTraversalStrategy(); Chris@0: Chris@0: /** Chris@0: * Returns all constraints of this element. Chris@0: * Chris@0: * @return Constraint[] A list of Constraint instances Chris@0: */ Chris@0: public function getConstraints(); Chris@0: Chris@0: /** Chris@0: * Returns all constraints for a given validation group. Chris@0: * Chris@0: * @param string $group The validation group Chris@0: * Chris@0: * @return Constraint[] A list of constraint instances Chris@0: */ Chris@0: public function findConstraints($group); Chris@0: }