vendor/symfony/validator/Constraints/Valid.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Component\Validator\Constraints;
  11. use Symfony\Component\Validator\Constraint;
  12. /**
  13.  * @Annotation
  14.  * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  15.  *
  16.  * @author Bernhard Schussek <bschussek@gmail.com>
  17.  */
  18. class Valid extends Constraint
  19. {
  20.     public $traverse true;
  21.     public function __get($option)
  22.     {
  23.         if ('groups' === $option) {
  24.             // when this is reached, no groups have been configured
  25.             return null;
  26.         }
  27.         return parent::__get($option);
  28.     }
  29.     /**
  30.      * {@inheritdoc}
  31.      */
  32.     public function addImplicitGroupName($group)
  33.     {
  34.         if (null !== $this->groups) {
  35.             parent::addImplicitGroupName($group);
  36.         }
  37.     }
  38. }