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