1 | <?php |
||
24 | final class Function_ implements Element |
||
25 | // // @codingStandardsIgnoreEnd |
||
26 | { |
||
27 | /** |
||
28 | * @var Fqsen Full Qualified Structural Element Name |
||
29 | */ |
||
30 | private $fqsen; |
||
31 | |||
32 | /** @var Argument[] $arguments */ |
||
33 | private $arguments = array(); |
||
34 | |||
35 | /** |
||
36 | * @var DocBlock|null |
||
37 | */ |
||
38 | private $docBlock; |
||
39 | |||
40 | /** |
||
41 | * @var Location |
||
42 | */ |
||
43 | private $location; |
||
44 | |||
45 | 3 | /** |
|
46 | * Initializes the object. |
||
47 | 3 | * |
|
48 | 3 | * @param Fqsen $fqsen |
|
49 | 3 | * @param DocBlock|null $docBlock |
|
50 | */ |
||
51 | public function __construct(Fqsen $fqsen, DocBlock $docBlock = null, Location $location = null) |
||
61 | |||
62 | /** |
||
63 | * Returns the arguments of this function. |
||
64 | * |
||
65 | * @return Argument[] |
||
66 | 1 | */ |
|
67 | public function getArguments() |
||
71 | |||
72 | /** |
||
73 | * Add an argument to the function. |
||
74 | * |
||
75 | * @param Argument $argument |
||
76 | 1 | */ |
|
77 | public function addArgument(Argument $argument) |
||
81 | |||
82 | /** |
||
83 | * Returns the Fqsen of the element. |
||
84 | * |
||
85 | * @return Fqsen |
||
86 | 1 | */ |
|
87 | public function getFqsen() |
||
91 | |||
92 | /** |
||
93 | * Returns the name of the element. |
||
94 | * |
||
95 | * @return string |
||
96 | 1 | */ |
|
97 | public function getName() |
||
101 | |||
102 | /** |
||
103 | * Returns the DocBlock of the element if available |
||
104 | * |
||
105 | * @return null|DocBlock |
||
106 | */ |
||
107 | public function getDocBlock() |
||
111 | |||
112 | /** |
||
113 | * @return Location |
||
114 | */ |
||
115 | public function getLocation() |
||
119 | } |
||
120 |