1 | <?php |
||
26 | final class Function_ implements Element |
||
27 | // // @codingStandardsIgnoreEnd |
||
28 | { |
||
29 | /** |
||
30 | * @var Fqsen Full Qualified Structural Element Name |
||
31 | */ |
||
32 | private $fqsen; |
||
33 | |||
34 | /** @var Argument[] $arguments */ |
||
35 | private $arguments = array(); |
||
36 | |||
37 | /** |
||
38 | * @var DocBlock|null |
||
39 | */ |
||
40 | private $docBlock; |
||
41 | |||
42 | /** |
||
43 | * @var Location |
||
44 | */ |
||
45 | private $location; |
||
46 | |||
47 | /** |
||
48 | * @var Type |
||
49 | */ |
||
50 | private $returnType; |
||
51 | |||
52 | /** |
||
53 | * Initializes the object. |
||
54 | * |
||
55 | * @param Fqsen $fqsen |
||
56 | * @param DocBlock|null $docBlock |
||
57 | * @param Location|null $location |
||
58 | * @param Type|null $returnType |
||
59 | */ |
||
60 | 5 | public function __construct( |
|
79 | |||
80 | /** |
||
81 | * Returns the arguments of this function. |
||
82 | * |
||
83 | * @return Argument[] |
||
84 | */ |
||
85 | 1 | public function getArguments() |
|
89 | |||
90 | /** |
||
91 | * Add an argument to the function. |
||
92 | * |
||
93 | * @param Argument $argument |
||
94 | */ |
||
95 | 1 | public function addArgument(Argument $argument) |
|
99 | |||
100 | /** |
||
101 | * Returns the Fqsen of the element. |
||
102 | * |
||
103 | * @return Fqsen |
||
104 | */ |
||
105 | 1 | public function getFqsen() |
|
109 | |||
110 | /** |
||
111 | * Returns the name of the element. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | 1 | public function getName() |
|
119 | |||
120 | /** |
||
121 | * Returns the DocBlock of the element if available |
||
122 | * |
||
123 | * @return null|DocBlock |
||
124 | */ |
||
125 | 1 | public function getDocBlock() |
|
129 | |||
130 | /** |
||
131 | * @return Location |
||
132 | */ |
||
133 | public function getLocation() |
||
137 | |||
138 | /** |
||
139 | * @return Type |
||
140 | */ |
||
141 | 2 | public function getReturnType() : Type |
|
145 | } |
||
146 |