1 | <?php |
||
24 | class ReflectionProperty extends BaseReflectionProperty |
||
25 | { |
||
26 | use InitializationTrait, InternalPropertiesEmulationTrait; |
||
27 | |||
28 | /** |
||
29 | * Type of property node |
||
30 | * |
||
31 | * @var Property |
||
32 | */ |
||
33 | private $propertyTypeNode; |
||
34 | |||
35 | /** |
||
36 | * Concrete property node |
||
37 | * |
||
38 | * @var PropertyProperty |
||
39 | */ |
||
40 | private $propertyNode; |
||
41 | |||
42 | /** |
||
43 | * Name of the class |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | private $className; |
||
48 | |||
49 | /** |
||
50 | * Initializes a reflection for the property |
||
51 | * |
||
52 | * @param string $className Name of the class with properties |
||
53 | * @param string $propertyName Name of the property to reflect |
||
54 | * @param Property $propertyType Property type definition node |
||
55 | * @param PropertyProperty $propertyNode Concrete property definition (value, name) |
||
56 | */ |
||
57 | 19 | public function __construct( |
|
74 | |||
75 | /** |
||
76 | * Returns an AST-node for property |
||
77 | * |
||
78 | * @return PropertyProperty |
||
79 | */ |
||
80 | public function getNode() |
||
84 | |||
85 | /** |
||
86 | * Returns an AST-node for property type |
||
87 | * |
||
88 | * @return Property |
||
89 | */ |
||
90 | public function getTypeNode() |
||
94 | |||
95 | /** |
||
96 | * Emulating original behaviour of reflection |
||
97 | */ |
||
98 | 1 | public function ___debugInfo() |
|
105 | |||
106 | /** |
||
107 | * Return string representation of this little old property. |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | 26 | public function __toString() |
|
120 | |||
121 | /** |
||
122 | * {@inheritDoc} |
||
123 | */ |
||
124 | 14 | public function getDeclaringClass() |
|
128 | |||
129 | /** |
||
130 | * @inheritDoc |
||
131 | */ |
||
132 | 26 | public function getDocComment() |
|
138 | |||
139 | /** |
||
140 | * {@inheritDoc} |
||
141 | */ |
||
142 | 59 | public function getModifiers() |
|
160 | |||
161 | /** |
||
162 | * @inheritDoc |
||
163 | */ |
||
164 | 267 | public function getName() |
|
168 | |||
169 | /** |
||
170 | * @inheritDoc |
||
171 | */ |
||
172 | 15 | public function getValue($object = null) |
|
188 | |||
189 | /** |
||
190 | * @inheritDoc |
||
191 | */ |
||
192 | 39 | public function isDefault() |
|
198 | |||
199 | /** |
||
200 | * {@inheritDoc} |
||
201 | */ |
||
202 | 85 | public function isPrivate() |
|
206 | |||
207 | /** |
||
208 | * {@inheritDoc} |
||
209 | */ |
||
210 | 85 | public function isProtected() |
|
214 | |||
215 | /** |
||
216 | * {@inheritDoc} |
||
217 | */ |
||
218 | 85 | public function isPublic() |
|
222 | |||
223 | /** |
||
224 | * {@inheritDoc} |
||
225 | */ |
||
226 | 92 | public function isStatic() |
|
230 | |||
231 | /** |
||
232 | * {@inheritDoc} |
||
233 | */ |
||
234 | 2 | public function setAccessible($accessible) |
|
240 | |||
241 | /** |
||
242 | * @inheritDoc |
||
243 | */ |
||
244 | 1 | public function setValue($object, $value = null) |
|
250 | |||
251 | /** |
||
252 | * Parses properties from the concrete class node |
||
253 | * |
||
254 | * @param ClassLike $classLikeNode Class-like node |
||
255 | * @param string $fullClassName FQN of the class |
||
256 | * |
||
257 | * @return array|ReflectionProperty[] |
||
258 | */ |
||
259 | 43 | public static function collectFromClassNode(ClassLike $classLikeNode, $fullClassName) |
|
279 | |||
280 | /** |
||
281 | * Implementation of internal reflection initialization |
||
282 | * |
||
283 | * @return void |
||
284 | */ |
||
285 | 2 | protected function __initialize() |
|
289 | } |
||
290 |