|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Doctrine\Common\Reflection; |
|
4
|
|
|
|
|
5
|
|
|
use ReflectionException; |
|
6
|
|
|
use ReflectionProperty; |
|
7
|
|
|
|
|
8
|
|
|
class StaticReflectionProperty extends ReflectionProperty |
|
9
|
|
|
{ |
|
10
|
|
|
/** |
|
11
|
|
|
* The PSR-0 parser object. |
|
12
|
|
|
* |
|
13
|
|
|
* @var StaticReflectionParser |
|
14
|
|
|
*/ |
|
15
|
|
|
protected $staticReflectionParser; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* The name of the property. |
|
19
|
|
|
* |
|
20
|
|
|
* @var string|null |
|
21
|
|
|
*/ |
|
22
|
|
|
protected $propertyName; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @param string|null $propertyName |
|
26
|
|
|
*/ |
|
27
|
15 |
|
public function __construct(StaticReflectionParser $staticReflectionParser, $propertyName) |
|
28
|
|
|
{ |
|
29
|
15 |
|
$this->staticReflectionParser = $staticReflectionParser; |
|
30
|
15 |
|
$this->propertyName = $propertyName; |
|
31
|
15 |
|
} |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* {@inheritDoc} |
|
35
|
|
|
*/ |
|
36
|
1 |
|
public function getName() |
|
37
|
|
|
{ |
|
38
|
1 |
|
return $this->propertyName; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @return StaticReflectionParser |
|
43
|
|
|
*/ |
|
44
|
3 |
|
protected function getStaticReflectionParser() |
|
45
|
|
|
{ |
|
46
|
3 |
|
return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('property', $this->propertyName); |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* {@inheritDoc} |
|
51
|
|
|
*/ |
|
52
|
1 |
|
public function getDeclaringClass() |
|
53
|
|
|
{ |
|
54
|
1 |
|
return $this->getStaticReflectionParser()->getReflectionClass(); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* {@inheritDoc} |
|
59
|
|
|
*/ |
|
60
|
1 |
|
public function getDocComment() |
|
61
|
|
|
{ |
|
62
|
1 |
|
return $this->getStaticReflectionParser()->getDocComment('property', $this->propertyName); |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @return string[] |
|
67
|
|
|
*/ |
|
68
|
1 |
|
public function getUseStatements() |
|
69
|
|
|
{ |
|
70
|
1 |
|
return $this->getStaticReflectionParser()->getUseStatements(); |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* {@inheritDoc} |
|
75
|
|
|
*/ |
|
76
|
1 |
|
public static function export($class, $name, $return = false) |
|
77
|
|
|
{ |
|
78
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* {@inheritDoc} |
|
83
|
|
|
*/ |
|
84
|
1 |
|
public function getModifiers() |
|
85
|
|
|
{ |
|
86
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* {@inheritDoc} |
|
91
|
|
|
*/ |
|
92
|
1 |
|
public function getValue($object = null) |
|
93
|
|
|
{ |
|
94
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* {@inheritDoc} |
|
99
|
|
|
*/ |
|
100
|
1 |
|
public function isDefault() |
|
101
|
|
|
{ |
|
102
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* {@inheritDoc} |
|
107
|
|
|
*/ |
|
108
|
1 |
|
public function isPrivate() |
|
109
|
|
|
{ |
|
110
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
/** |
|
114
|
|
|
* {@inheritDoc} |
|
115
|
|
|
*/ |
|
116
|
1 |
|
public function isProtected() |
|
117
|
|
|
{ |
|
118
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
/** |
|
122
|
|
|
* {@inheritDoc} |
|
123
|
|
|
*/ |
|
124
|
1 |
|
public function isPublic() |
|
125
|
|
|
{ |
|
126
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* {@inheritDoc} |
|
131
|
|
|
*/ |
|
132
|
1 |
|
public function isStatic() |
|
133
|
|
|
{ |
|
134
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* {@inheritDoc} |
|
139
|
|
|
*/ |
|
140
|
1 |
|
public function setAccessible($accessible) |
|
141
|
|
|
{ |
|
142
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
/** |
|
146
|
|
|
* {@inheritDoc} |
|
147
|
|
|
*/ |
|
148
|
1 |
|
public function setValue($object, $value = null) |
|
149
|
|
|
{ |
|
150
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
/** |
|
154
|
|
|
* {@inheritDoc} |
|
155
|
|
|
*/ |
|
156
|
1 |
|
public function __toString() |
|
157
|
|
|
{ |
|
158
|
1 |
|
throw new ReflectionException('Method not implemented'); |
|
159
|
|
|
} |
|
160
|
|
|
} |
|
161
|
|
|
|