You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
521 B

3 years ago
  1. <?php
  2. #[Attribute(Attribute::TARGET_CLASS)]
  3. final class Attribute
  4. {
  5. public const TARGET_CLASS = 1;
  6. public const TARGET_FUNCTION = 2;
  7. public const TARGET_METHOD = 4;
  8. public const TARGET_PROPERTY = 8;
  9. public const TARGET_CLASS_CONSTANT = 16;
  10. public const TARGET_PARAMETER = 32;
  11. public const TARGET_ALL = 63;
  12. public const IS_REPEATABLE = 64;
  13. /** @var int */
  14. public $flags;
  15. public function __construct(int $flags = self::TARGET_ALL)
  16. {
  17. $this->flags = $flags;
  18. }
  19. }