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\Constraints;
14 use Symfony\Component\Validator\Constraint;
15 use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
18 * Used for the comparison of values.
20 * @author Daniel Holmes <daniel@danielholmes.org>
21 * @author Bernhard Schussek <bschussek@gmail.com>
23 abstract class AbstractComparison extends Constraint
31 public function __construct($options = null)
33 if (is_array($options) && !isset($options['value'])) {
34 throw new ConstraintDefinitionException(sprintf(
35 'The %s constraint requires the "value" option to be set.',
40 parent::__construct($options);
46 public function getDefaultOption()