1 | <?php |
||
26 | class ReflectionProperty extends BaseReflectionProperty |
||
27 | { |
||
28 | use InitializationTrait; |
||
29 | use InternalPropertiesEmulationTrait; |
||
30 | |||
31 | /** |
||
32 | * Type of property node |
||
33 | * |
||
34 | * @var Property |
||
35 | */ |
||
36 | private $propertyTypeNode; |
||
37 | |||
38 | /** |
||
39 | * Concrete property node |
||
40 | * |
||
41 | * @var PropertyProperty |
||
42 | */ |
||
43 | private $propertyNode; |
||
44 | |||
45 | /** |
||
46 | * Name of the class |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | private $className; |
||
51 | |||
52 | /** |
||
53 | * Initializes a reflection for the property |
||
54 | * |
||
55 | * @param string $className Name of the class with properties |
||
56 | * @param string $propertyName Name of the property to reflect |
||
57 | * @param ?Property $propertyType Property type definition node |
||
|
|||
58 | * @param ?PropertyProperty $propertyNode Concrete property definition (value, name) |
||
59 | */ |
||
60 | 20 | public function __construct( |
|
77 | |||
78 | /** |
||
79 | * Returns an AST-node for property |
||
80 | * |
||
81 | * @return PropertyProperty |
||
82 | */ |
||
83 | public function getNode() |
||
87 | |||
88 | /** |
||
89 | * Returns an AST-node for property type |
||
90 | * |
||
91 | * @return Property |
||
92 | */ |
||
93 | public function getTypeNode() |
||
97 | |||
98 | /** |
||
99 | * Emulating original behaviour of reflection |
||
100 | */ |
||
101 | 1 | public function __debugInfo(): array |
|
108 | |||
109 | /** |
||
110 | * Return string representation of this little old property. |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | 26 | public function __toString() |
|
123 | |||
124 | /** |
||
125 | * {@inheritDoc} |
||
126 | */ |
||
127 | 15 | public function getDeclaringClass() |
|
131 | |||
132 | /** |
||
133 | * @inheritDoc |
||
134 | */ |
||
135 | 26 | public function getDocComment() |
|
141 | |||
142 | /** |
||
143 | * {@inheritDoc} |
||
144 | */ |
||
145 | 60 | public function getModifiers() |
|
163 | |||
164 | /** |
||
165 | * @inheritDoc |
||
166 | */ |
||
167 | 268 | public function getName() |
|
171 | |||
172 | /** |
||
173 | * @inheritDoc |
||
174 | */ |
||
175 | 16 | public function getValue($object = null) |
|
191 | |||
192 | /** |
||
193 | * @inheritDoc |
||
194 | */ |
||
195 | 39 | public function isDefault() |
|
201 | |||
202 | /** |
||
203 | * {@inheritDoc} |
||
204 | */ |
||
205 | 86 | public function isPrivate() |
|
209 | |||
210 | /** |
||
211 | * {@inheritDoc} |
||
212 | */ |
||
213 | 86 | public function isProtected() |
|
217 | |||
218 | /** |
||
219 | * {@inheritDoc} |
||
220 | */ |
||
221 | 86 | public function isPublic() |
|
225 | |||
226 | /** |
||
227 | * {@inheritDoc} |
||
228 | */ |
||
229 | 93 | public function isStatic() |
|
233 | |||
234 | /** |
||
235 | * {@inheritDoc} |
||
236 | */ |
||
237 | 2 | public function setAccessible($accessible) |
|
243 | |||
244 | /** |
||
245 | * @inheritDoc |
||
246 | */ |
||
247 | 1 | public function setValue($object, $value = null) |
|
253 | |||
254 | /** |
||
255 | * Parses properties from the concrete class node |
||
256 | * |
||
257 | * @param ClassLike $classLikeNode Class-like node |
||
258 | * @param string $fullClassName FQN of the class |
||
259 | * |
||
260 | * @return array|ReflectionProperty[] |
||
261 | */ |
||
262 | 44 | public static function collectFromClassNode(ClassLike $classLikeNode, $fullClassName) |
|
282 | |||
283 | /** |
||
284 | * Implementation of internal reflection initialization |
||
285 | * |
||
286 | * @return void |
||
287 | */ |
||
288 | 2 | protected function __initialize(): void |
|
292 | } |
||
293 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.