1 | <?php |
||
20 | class ReflectionClassConstant extends BaseReflectionClassConstant |
||
21 | { |
||
22 | /** |
||
23 | * Concrete class constant node |
||
24 | * |
||
25 | * @var ClassConst |
||
26 | */ |
||
27 | private $classConstantNode; |
||
28 | |||
29 | /** |
||
30 | * @var Const_ |
||
31 | */ |
||
32 | private $constNode; |
||
33 | |||
34 | /** |
||
35 | * Name of the class |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $className; |
||
40 | |||
41 | /** |
||
42 | * Parses class constants from the concrete class node |
||
43 | * |
||
44 | * @param ClassLike $classLikeNode Class-like node |
||
45 | * @param string $reflectionClassName FQN of the class |
||
46 | * |
||
47 | * @return array|ReflectionClassConstant[] |
||
48 | */ |
||
49 | 7 | public static function collectFromClassNode(ClassLike $classLikeNode, string $reflectionClassName): array |
|
69 | |||
70 | /** |
||
71 | * Initializes a reflection for the class constant |
||
72 | * |
||
73 | * @param string $className Name of the class |
||
74 | * @param string $classConstantName Name of the class constant to reflect |
||
75 | * @param ClassConst $classConstNode ClassConstant definition node |
||
76 | * @param Const_|null $constNode Concrete const definition node |
||
77 | */ |
||
78 | 6 | public function __construct( |
|
93 | |||
94 | /** |
||
95 | * @inheritDoc |
||
96 | */ |
||
97 | 2 | public function getDeclaringClass() |
|
101 | |||
102 | /** |
||
103 | * @inheritDoc |
||
104 | */ |
||
105 | 1 | public function getDocComment() |
|
111 | |||
112 | /** |
||
113 | * @inheritDoc |
||
114 | */ |
||
115 | 2 | public function getModifiers() |
|
130 | |||
131 | /** |
||
132 | * @inheritDoc |
||
133 | */ |
||
134 | 3 | public function getName() |
|
138 | |||
139 | /** |
||
140 | * @inheritDoc |
||
141 | */ |
||
142 | 2 | public function getValue() |
|
148 | |||
149 | /** |
||
150 | * @inheritDoc |
||
151 | */ |
||
152 | 2 | public function isPrivate() |
|
156 | |||
157 | /** |
||
158 | * @inheritDoc |
||
159 | */ |
||
160 | 2 | public function isProtected() |
|
164 | |||
165 | /** |
||
166 | * @inheritDoc |
||
167 | */ |
||
168 | 2 | public function isPublic() |
|
172 | |||
173 | /** |
||
174 | * @inheritDoc |
||
175 | */ |
||
176 | 2 | public function __toString() |
|
189 | } |
||
190 |