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;
20 * @author Bernhard Schussek <bschussek@gmail.com>
22 class Traverse extends Constraint
24 public $traverse = true;
26 public function __construct($options = null)
28 if (is_array($options) && array_key_exists('groups', $options)) {
29 throw new ConstraintDefinitionException(sprintf(
30 'The option "groups" is not supported by the constraint %s',
35 parent::__construct($options);
41 public function getDefaultOption()
49 public function getTargets()
51 return self::CLASS_CONSTRAINT;