1 | <?php |
||
15 | trait QualifiedNamePart { |
||
16 | |||
17 | use NamePart; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $namespace; |
||
21 | |||
22 | /** |
||
23 | * Sets the namespace |
||
24 | * |
||
25 | * @param string $namespace |
||
26 | * @return $this |
||
27 | */ |
||
28 | 11 | public function setNamespace(?string $namespace) { |
|
33 | |||
34 | /** |
||
35 | * In contrast to setName(), this method accepts the fully qualified name |
||
36 | * including the namespace. |
||
37 | * |
||
38 | * @param string $name |
||
39 | * @return $this |
||
40 | */ |
||
41 | 76 | public function setQualifiedName(?string $name) { |
|
58 | |||
59 | /** |
||
60 | * Returns the namespace |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | 24 | public function getNamespace(): ?string { |
|
67 | |||
68 | /** |
||
69 | * Returns the qualified name |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | 26 | public function getQualifiedName(): string { |
|
80 | |||
81 | 22 | public function __toString(): string |
|
85 | } |
||
86 |