1 | <?php |
||
35 | class Annotation { |
||
36 | |||
37 | /** @const annotation targets */ |
||
38 | const TARGET_CLASS = 1; |
||
39 | const TARGET_METHOD = 2; |
||
40 | const TARGET_PROPERTY = 4; |
||
41 | |||
42 | /** @var integer */ |
||
43 | protected $target; |
||
44 | |||
45 | /** @var string */ |
||
46 | protected $targetLocation; |
||
47 | |||
48 | /** @var string */ |
||
49 | protected $name; |
||
50 | |||
51 | /** @var array */ |
||
52 | protected $values; |
||
53 | |||
54 | /** |
||
55 | * Class constructor. |
||
56 | * @param integer $target |
||
57 | * @param string $targetLocation |
||
58 | * @param string $name the annotation name |
||
59 | * @param array $values the annotation values |
||
60 | */ |
||
61 | 2 | public function __construct($target, $targetLocation, $name, array $values = []) { |
|
70 | |||
71 | /** |
||
72 | * Returns the annotation target |
||
73 | * @return integer the annotation target |
||
74 | */ |
||
75 | 1 | public function getTarget() { |
|
78 | |||
79 | /** |
||
80 | * Returns the target location. |
||
81 | * @return string the target location |
||
82 | */ |
||
83 | 1 | public function getTargetLocation() { |
|
86 | |||
87 | /** |
||
88 | * Returns the annotation name. |
||
89 | * @return string annotation name |
||
90 | */ |
||
91 | 1 | public function getName() { |
|
94 | |||
95 | /** |
||
96 | * Returns the annotation values. |
||
97 | * @return array annotations values |
||
98 | */ |
||
99 | 1 | public function getValues() { |
|
102 | |||
103 | /** |
||
104 | * Checks if the annotation has a value. |
||
105 | * @return boolean check result |
||
106 | */ |
||
107 | 1 | public function hasValues() { |
|
110 | |||
111 | } |
||
112 |