Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/Constraints/Traverse.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 /* | |
4 * This file is part of the Symfony package. | |
5 * | |
6 * (c) Fabien Potencier <fabien@symfony.com> | |
7 * | |
8 * For the full copyright and license information, please view the LICENSE | |
9 * file that was distributed with this source code. | |
10 */ | |
11 | |
12 namespace Symfony\Component\Validator\Constraints; | |
13 | |
14 use Symfony\Component\Validator\Constraint; | |
15 use Symfony\Component\Validator\Exception\ConstraintDefinitionException; | |
16 | |
17 /** | |
18 * @Annotation | |
19 * | |
20 * @author Bernhard Schussek <bschussek@gmail.com> | |
21 */ | |
22 class Traverse extends Constraint | |
23 { | |
24 public $traverse = true; | |
25 | |
26 public function __construct($options = null) | |
27 { | |
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', | |
31 __CLASS__ | |
32 )); | |
33 } | |
34 | |
35 parent::__construct($options); | |
36 } | |
37 | |
38 /** | |
39 * {@inheritdoc} | |
40 */ | |
41 public function getDefaultOption() | |
42 { | |
43 return 'traverse'; | |
44 } | |
45 | |
46 /** | |
47 * {@inheritdoc} | |
48 */ | |
49 public function getTargets() | |
50 { | |
51 return self::CLASS_CONSTRAINT; | |
52 } | |
53 } |