1 | <?php |
||
13 | trait QualifiedNamePart { |
||
14 | |||
15 | use NamePart; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $namespace; |
||
19 | |||
20 | /** |
||
21 | * Sets the namespace |
||
22 | * |
||
23 | * @param string $namespace |
||
24 | * @return $this |
||
25 | */ |
||
26 | 10 | public function setNamespace(?string $namespace) { |
|
31 | |||
32 | /** |
||
33 | * In contrast to setName(), this method accepts the fully qualified name |
||
34 | * including the namespace. |
||
35 | * |
||
36 | * @param string $name |
||
37 | * @return $this |
||
38 | */ |
||
39 | 65 | public function setQualifiedName(?string $name) { |
|
56 | |||
57 | /** |
||
58 | * Returns the namespace |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | 19 | public function getNamespace(): ?string { |
|
65 | |||
66 | /** |
||
67 | * Returns the qualified name |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | 3 | public function getQualifiedName(): string { |
|
78 | } |
||
79 |