1
0

Attribute.php 752 B

12345678910111213141516171819202122232425262728293031
  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. #[Attribute(Attribute::TARGET_CLASS)]
  11. final class Attribute
  12. {
  13. public const TARGET_CLASS = 1;
  14. public const TARGET_FUNCTION = 2;
  15. public const TARGET_METHOD = 4;
  16. public const TARGET_PROPERTY = 8;
  17. public const TARGET_CLASS_CONSTANT = 16;
  18. public const TARGET_PARAMETER = 32;
  19. public const TARGET_ALL = 63;
  20. public const IS_REPEATABLE = 64;
  21. /** @var int */
  22. public $flags;
  23. public function __construct(int $flags = self::TARGET_ALL)
  24. {
  25. $this->flags = $flags;
  26. }
  27. }