vendor/symfony/src/Symfony/Component/Validator/ValidatorInterface.php
changeset 0 7f95f8617b0b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/symfony/src/Symfony/Component/Validator/ValidatorInterface.php	Sat Sep 24 15:40:41 2011 +0200
@@ -0,0 +1,81 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Validator;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Validates a given value.
+ *
+ * @author Bernhard Schussek <bernhard.schussek@symfony.com>
+ *
+ * @api
+ */
+interface ValidatorInterface
+{
+    /**
+     * Validate the given object.
+     *
+     * @param object $object The object to validate
+     * @param array|null $groups The validator groups to use for validating
+     * @return ConstraintViolationList
+     *
+     * @api
+     */
+    function validate($object, $groups = null);
+
+    /**
+     * Validate a single property of an object against its current value.
+     *
+     * @param object $object The object to validate
+     * @param string $property The name of the property to validate
+     * @param array|null $groups The validator groups to use for validating
+     * @return ConstraintViolationList
+     *
+     * @api
+     */
+    function validateProperty($object, $property, $groups = null);
+
+    /**
+     * Validate a single property of an object against the given value.
+     *
+     * @param string     $class    The class on which the property belongs
+     * @param string     $property The name of the property to validate
+     * @param string     $value
+     * @param array|null $groups   The validator groups to use for validating
+     * @return ConstraintViolationList
+     *
+     * @api
+     */
+    function validatePropertyValue($class, $property, $value, $groups = null);
+
+    /**
+     * Validates a given value against a specific Constraint.
+     *
+     * @param mixed $value The value to validate
+     * @param Constraint $constraint The constraint to validate against
+     * @param array|null $groups The validator groups to use for validating
+     * @return ConstraintViolationList
+     *
+     * @api
+     */
+    function validateValue($value, Constraint $constraint, $groups = null);
+
+    /**
+     * Returns the factory for ClassMetadata instances
+     *
+     * @return Mapping\ClassMetadataFactoryInterface
+     *
+     * @api
+     */
+    function getMetadataFactory();
+}