vendor/nelmio/api-doc-bundle/Annotation/Security.php line 40

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the NelmioApiDocBundle package.
  4. *
  5. * (c) Nelmio
  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 Nelmio\ApiDocBundle\Annotation;
  11. use OpenApi\Annotations\AbstractAnnotation;
  12. /**
  13. * @Annotation
  14. */
  15. #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
  16. class Security extends AbstractAnnotation
  17. {
  18. /** {@inheritdoc} */
  19. public static $_types = [
  20. 'name' => 'string',
  21. 'scopes' => '[string]',
  22. ];
  23. public static $_required = ['name'];
  24. /**
  25. * @var string
  26. */
  27. public $name;
  28. /**
  29. * @var string[]
  30. */
  31. public $scopes = [];
  32. public function __construct(
  33. array $properties = [],
  34. string $name = null,
  35. array $scopes = []
  36. ) {
  37. parent::__construct($properties + [
  38. 'name' => $name,
  39. 'scopes' => $scopes,
  40. ]);
  41. }
  42. }