1 | <?php |
||
24 | final class Method implements Element |
||
25 | { |
||
26 | /** |
||
27 | * @var DocBlock|null documentation of this method. |
||
28 | */ |
||
29 | private $docBlock = null; |
||
30 | |||
31 | /** |
||
32 | * @var Fqsen Full Qualified Structural Element Name |
||
33 | */ |
||
34 | private $fqsen; |
||
35 | |||
36 | /** @var bool $abstract */ |
||
37 | private $abstract = false; |
||
38 | |||
39 | /** @var bool $final */ |
||
40 | private $final = false; |
||
41 | |||
42 | /** @var bool $static */ |
||
43 | private $static = false; |
||
44 | |||
45 | /** @var Visibility visibility of this method */ |
||
46 | private $visibility = null; |
||
47 | |||
48 | /** @var Argument[] */ |
||
49 | private $arguments = array(); |
||
50 | |||
51 | /** |
||
52 | * @var Location |
||
53 | */ |
||
54 | private $location; |
||
55 | |||
56 | /** |
||
57 | * Initializes the all properties. |
||
58 | * |
||
59 | * @param Fqsen $fqsen |
||
60 | 7 | * @param Visibility|null $visibility when null is provided a default 'public' is set. |
|
61 | * @param DocBlock|null $docBlock |
||
62 | * @param bool $abstract |
||
63 | * @param bool $static |
||
64 | * @param bool $final |
||
65 | * @param Location|null $location |
||
66 | */ |
||
67 | public function __construct( |
||
93 | |||
94 | /** |
||
95 | * Returns true when this method is abstract. Otherwise returns false. |
||
96 | 1 | * |
|
97 | * @return bool |
||
98 | 1 | */ |
|
99 | public function isAbstract() |
||
103 | |||
104 | /** |
||
105 | * Returns true when this method is final. Otherwise returns false. |
||
106 | 1 | * |
|
107 | * @return bool |
||
108 | 1 | */ |
|
109 | public function isFinal() |
||
113 | |||
114 | /** |
||
115 | * Returns true when this method is static. Otherwise returns false. |
||
116 | 2 | * |
|
117 | * @return bool |
||
118 | 2 | */ |
|
119 | public function isStatic() |
||
123 | |||
124 | /** |
||
125 | * Returns the Visibility of this method. |
||
126 | 1 | * |
|
127 | * @return Visibility |
||
128 | 1 | */ |
|
129 | public function getVisibility() |
||
133 | |||
134 | /** |
||
135 | * Returns the arguments of this method. |
||
136 | * |
||
137 | * @return Argument[] |
||
138 | 1 | */ |
|
139 | public function getArguments() |
||
143 | |||
144 | |||
145 | /** |
||
146 | * Add new argument to this method. |
||
147 | * |
||
148 | 1 | * @param Argument $argument |
|
149 | * @return void |
||
150 | 1 | */ |
|
151 | public function addArgument(Argument $argument) |
||
155 | |||
156 | /** |
||
157 | * Returns the Fqsen of the element. |
||
158 | 1 | * |
|
159 | * @return Fqsen |
||
160 | 1 | */ |
|
161 | public function getFqsen() |
||
165 | |||
166 | /** |
||
167 | * Returns the name of the element. |
||
168 | 1 | * |
|
169 | * @return string |
||
170 | 1 | */ |
|
171 | public function getName() |
||
175 | |||
176 | /** |
||
177 | * Returns the DocBlock of this method if available. |
||
178 | * |
||
179 | * @returns null|DocBlock |
||
180 | */ |
||
181 | public function getDocBlock() |
||
185 | |||
186 | /** |
||
187 | * @return Location |
||
188 | */ |
||
189 | public function getLocation() |
||
193 | } |
||
194 |