1 | <?php |
||
24 | final class Property implements Element |
||
25 | { |
||
26 | /** |
||
27 | * @var Fqsen |
||
28 | */ |
||
29 | private $fqsen; |
||
30 | |||
31 | /** |
||
32 | * @var DocBlock|null |
||
33 | */ |
||
34 | private $docBlock; |
||
35 | |||
36 | /** @var string[] $types */ |
||
37 | private $types = array(); |
||
38 | |||
39 | /** @var string $default */ |
||
40 | private $default = null; |
||
41 | |||
42 | /** @var bool $static */ |
||
43 | private $static = false; |
||
44 | |||
45 | /** @var Visibility $visibility */ |
||
46 | private $visibility; |
||
47 | |||
48 | /** |
||
49 | * @var Location |
||
50 | */ |
||
51 | private $location; |
||
52 | |||
53 | /** |
||
54 | 5 | * @param Fqsen $fqsen |
|
55 | * @param Visibility|null $visibility when null is provided a default 'public' is set. |
||
56 | * @param DocBlock|null $docBlock |
||
57 | * @param null|string $default |
||
58 | * @param bool $static |
||
59 | * @param Location|null $location |
||
60 | */ |
||
61 | 5 | public function __construct( |
|
85 | |||
86 | /** |
||
87 | 1 | * returns the default value of this property. |
|
88 | * |
||
89 | 1 | * @return string |
|
90 | */ |
||
91 | public function getDefault() |
||
95 | |||
96 | /** |
||
97 | 1 | * Returns true when this method is static. Otherwise returns false. |
|
98 | * |
||
99 | 1 | * @return bool |
|
100 | */ |
||
101 | public function isStatic() |
||
105 | |||
106 | /** |
||
107 | * Returns the types of this property. |
||
108 | 1 | * |
|
109 | * @return string[] |
||
110 | 1 | */ |
|
111 | 1 | public function getTypes() |
|
115 | |||
116 | /** |
||
117 | * Add a type to this property |
||
118 | 1 | * |
|
119 | * @param string $type |
||
120 | 1 | * @return void |
|
121 | */ |
||
122 | public function addType($type) |
||
126 | |||
127 | /** |
||
128 | 1 | * Return visibility of the property. |
|
129 | * |
||
130 | 1 | * @return Visibility |
|
131 | */ |
||
132 | public function getVisibility() |
||
136 | |||
137 | /** |
||
138 | 1 | * Returns the Fqsen of the element. |
|
139 | * |
||
140 | 1 | * @return Fqsen |
|
141 | */ |
||
142 | public function getFqsen() |
||
146 | |||
147 | /** |
||
148 | 1 | * Returns the name of the element. |
|
149 | * |
||
150 | 1 | * @return string |
|
151 | */ |
||
152 | public function getName() |
||
156 | |||
157 | /** |
||
158 | * Returns the DocBlock of this property. |
||
159 | * |
||
160 | * @return DocBlock|null |
||
161 | */ |
||
162 | public function getDocBlock() |
||
166 | |||
167 | /** |
||
168 | * @return Location |
||
169 | */ |
||
170 | public function getLocation() |
||
174 | } |
||
175 |