1 | <?php |
||
13 | class XmlElement extends Element implements PrefixableInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var null|string |
||
17 | */ |
||
18 | private $prefix; |
||
19 | |||
20 | /** |
||
21 | * XmlElement constructor. |
||
22 | * |
||
23 | * @param string $name |
||
24 | * @param string|null $prefix |
||
25 | 14 | * @param string|null $value |
|
26 | */ |
||
27 | 14 | public function __construct(string $name, string $prefix = null, string $value = null) |
|
33 | |||
34 | /** |
||
35 | * @param Attribute $attribute |
||
36 | */ |
||
37 | 7 | public function setAttribute(Attribute $attribute) |
|
43 | |||
44 | /** |
||
45 | 14 | * @return bool |
|
46 | */ |
||
47 | 14 | final public function hasPrefix(): bool |
|
51 | |||
52 | /** |
||
53 | 14 | * @return string |
|
54 | */ |
||
55 | 14 | final public function getPrefix(): string |
|
59 | 14 | ||
60 | /** |
||
61 | * @param string $prefix |
||
62 | */ |
||
63 | public function setPrefix(string $prefix) |
||
67 | 5 | ||
68 | 4 | /** |
|
69 | * @return string |
||
70 | */ |
||
71 | 1 | final public function getPrefixedName(): string |
|
79 | 11 | ||
80 | 11 | /** |
|
81 | * @param ElementVisitorInterface $visitor |
||
82 | */ |
||
83 | public function accept(ElementVisitorInterface $visitor) |
||
87 | } |