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\Constraints; Chris@0: Chris@0: use Symfony\Component\Validator\Constraint; Chris@0: use Symfony\Component\Validator\Exception\ConstraintDefinitionException; Chris@0: Chris@0: /** Chris@0: * @Annotation Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: */ Chris@0: class Traverse extends Constraint Chris@0: { Chris@0: public $traverse = true; Chris@0: Chris@0: public function __construct($options = null) Chris@0: { Chris@18: if (\is_array($options) && \array_key_exists('groups', $options)) { Chris@17: throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); Chris@0: } Chris@0: Chris@0: parent::__construct($options); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getDefaultOption() Chris@0: { Chris@0: return 'traverse'; Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getTargets() Chris@0: { Chris@0: return self::CLASS_CONSTRAINT; Chris@0: } Chris@0: }