1 | <?php |
||
24 | final class Namespace_ implements Element |
||
25 | // codingStandardsIgnoreEnd |
||
26 | { |
||
27 | /** |
||
28 | * @var Fqsen Full Qualified Structural Element Name |
||
29 | */ |
||
30 | private $fqsen; |
||
31 | |||
32 | /** |
||
33 | * @var Fqsen[] fqsen of all functions in this namespace |
||
34 | */ |
||
35 | private $functions = []; |
||
36 | |||
37 | /** |
||
38 | * @var Fqsen[] fqsen of all constants in this namespace |
||
39 | */ |
||
40 | private $constants = []; |
||
41 | |||
42 | /** |
||
43 | * @var Fqsen[] fqsen of all classes in this namespace |
||
44 | */ |
||
45 | private $classes = []; |
||
46 | |||
47 | /** |
||
48 | * @var Fqsen[] fqsen of all interfaces in this namespace |
||
49 | */ |
||
50 | private $interfaces = []; |
||
51 | |||
52 | /** |
||
53 | * @var Fqsen[] fqsen of all traits in this namespace |
||
54 | */ |
||
55 | private $traits = []; |
||
56 | |||
57 | /** |
||
58 | * Initializes the namespace. |
||
59 | */ |
||
60 | 6 | public function __construct(Fqsen $fqsen) |
|
64 | |||
65 | /** |
||
66 | * Returns a list of all fqsen of classes in this namespace. |
||
67 | * |
||
68 | * @return Fqsen[] |
||
69 | */ |
||
70 | 1 | public function getClasses(): array |
|
74 | |||
75 | /** |
||
76 | * Add a class to this namespace. |
||
77 | */ |
||
78 | 1 | public function addClass(Fqsen $class): void |
|
82 | |||
83 | /** |
||
84 | * Returns a list of all constants in this namespace. |
||
85 | * |
||
86 | * @return Fqsen[] |
||
87 | */ |
||
88 | 1 | public function getConstants(): array |
|
92 | |||
93 | /** |
||
94 | * Add a Constant to this Namespace. |
||
95 | */ |
||
96 | 1 | public function addConstant(Fqsen $contant): void |
|
100 | |||
101 | /** |
||
102 | * Returns a list of all functions in this namespace. |
||
103 | * |
||
104 | * @return Fqsen[] |
||
105 | */ |
||
106 | 1 | public function getFunctions(): array |
|
110 | |||
111 | /** |
||
112 | * Add a function to this namespace. |
||
113 | */ |
||
114 | 1 | public function addFunction(Fqsen $function): void |
|
118 | |||
119 | /** |
||
120 | * Returns a list of all interfaces in this namespace. |
||
121 | * |
||
122 | * @return Fqsen[] |
||
123 | */ |
||
124 | 1 | public function getInterfaces(): array |
|
128 | |||
129 | /** |
||
130 | * Add an interface the this namespace. |
||
131 | */ |
||
132 | 1 | public function addInterface(Fqsen $interface): void |
|
136 | |||
137 | /** |
||
138 | * Returns a list of all traits in this namespace. |
||
139 | * |
||
140 | * @return Fqsen[] |
||
141 | */ |
||
142 | 1 | public function getTraits(): array |
|
146 | |||
147 | /** |
||
148 | * Add a trait to this namespace. |
||
149 | */ |
||
150 | 1 | public function addTrait(Fqsen $trait): void |
|
154 | |||
155 | /** |
||
156 | * Returns the Fqsen of the element. |
||
157 | */ |
||
158 | 1 | public function getFqsen(): Fqsen |
|
162 | |||
163 | /** |
||
164 | * Returns the name of the element. |
||
165 | */ |
||
166 | 1 | public function getName(): string |
|
170 | } |
||
171 |