2010-06-24 09:40:05 +01:00
|
|
|
<?php
|
|
|
|
|
2010-10-02 11:42:31 +01:00
|
|
|
/*
|
2011-01-15 13:29:43 +00:00
|
|
|
* This file is part of the Symfony package.
|
2010-10-02 11:42:31 +01:00
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
2010-10-02 11:42:31 +01:00
|
|
|
*
|
2011-01-15 13:29:43 +00:00
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
2010-10-02 11:42:31 +01:00
|
|
|
*/
|
|
|
|
|
2011-01-15 13:29:43 +00:00
|
|
|
namespace Symfony\Component\Validator;
|
|
|
|
|
2011-07-20 09:37:57 +01:00
|
|
|
/**
|
|
|
|
* @api
|
|
|
|
*/
|
2010-06-24 09:40:05 +01:00
|
|
|
interface ConstraintValidatorInterface
|
|
|
|
{
|
2011-01-16 04:41:23 +00:00
|
|
|
/**
|
2011-07-20 09:37:57 +01:00
|
|
|
* Initializes the constraint validator.
|
2011-01-16 04:41:23 +00:00
|
|
|
*
|
2011-01-19 14:02:00 +00:00
|
|
|
* @param ExecutionContext $context The current validation context
|
2011-01-16 04:41:23 +00:00
|
|
|
*/
|
2011-01-19 14:02:00 +00:00
|
|
|
function initialize(ExecutionContext $context);
|
2010-06-24 09:40:05 +01:00
|
|
|
|
2011-01-16 04:41:23 +00:00
|
|
|
/**
|
2011-07-20 09:37:57 +01:00
|
|
|
* Checks if the passed value is valid.
|
|
|
|
*
|
|
|
|
* @param mixed $value The value that should be validated
|
2011-01-16 04:41:23 +00:00
|
|
|
* @param Constraint $constraint The constrain for the validation
|
2011-07-20 09:37:57 +01:00
|
|
|
*
|
2011-01-21 01:39:28 +00:00
|
|
|
* @return Boolean Whether or not the value is valid
|
2011-07-20 09:37:57 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-01-16 04:41:23 +00:00
|
|
|
*/
|
2010-10-15 22:49:09 +01:00
|
|
|
function isValid($value, Constraint $constraint);
|
2010-06-24 09:40:05 +01:00
|
|
|
|
2011-01-16 04:41:23 +00:00
|
|
|
/**
|
|
|
|
* @return string
|
2011-07-20 09:37:57 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-01-16 04:41:23 +00:00
|
|
|
*/
|
2010-10-15 22:49:09 +01:00
|
|
|
function getMessageTemplate();
|
2010-06-24 09:40:05 +01:00
|
|
|
|
2011-01-16 04:41:23 +00:00
|
|
|
/**
|
|
|
|
* @return array
|
2011-07-20 09:37:57 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-01-16 04:41:23 +00:00
|
|
|
*/
|
2010-10-15 22:49:09 +01:00
|
|
|
function getMessageParameters();
|
2010-10-02 11:42:31 +01:00
|
|
|
}
|