vendor/symfony/validator/Constraints/All.php line 21

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. /**
  12. * @Annotation
  13. * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  14. *
  15. * @author Bernhard Schussek <bschussek@gmail.com>
  16. */
  17. #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
  18. class All extends Composite
  19. {
  20. public $constraints = [];
  21. public function __construct(mixed $constraints = null, ?array $groups = null, mixed $payload = null)
  22. {
  23. parent::__construct($constraints ?? [], $groups, $payload);
  24. }
  25. public function getDefaultOption(): ?string
  26. {
  27. return 'constraints';
  28. }
  29. public function getRequiredOptions(): array
  30. {
  31. return ['constraints'];
  32. }
  33. protected function getCompositeOption(): string
  34. {
  35. return 'constraints';
  36. }
  37. }