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: Chris@0: /** Chris@0: * @Annotation Chris@0: * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: */ Chris@0: class Valid extends Constraint Chris@0: { Chris@0: public $traverse = true; Chris@0: Chris@14: public function __get($option) Chris@0: { Chris@14: if ('groups' === $option) { Chris@14: // when this is reached, no groups have been configured Chris@14: return null; Chris@0: } Chris@0: Chris@14: return parent::__get($option); Chris@14: } Chris@14: Chris@14: /** Chris@14: * {@inheritdoc} Chris@14: */ Chris@14: public function addImplicitGroupName($group) Chris@14: { Chris@14: if (null !== $this->groups) { Chris@14: parent::addImplicitGroupName($group); Chris@14: } Chris@0: } Chris@0: }