1 | <?php |
||
15 | final class DOMWrapper implements XMLDocumentInterface |
||
16 | { |
||
17 | use ElementTrait; |
||
18 | |||
19 | /** |
||
20 | * @var DOMDocument |
||
21 | */ |
||
22 | private $dom; |
||
23 | |||
24 | 127 | public function __construct() |
|
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public function setAttribute($name, $value = null) |
||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function getAttribute($name) |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function setAttributeNS($namespaceURI, $qualifiedName, $value) |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function getAttributeNS($namespaceURI, $localName) |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | 127 | public function appendChild(XMLDocumentInterface $newNode) |
|
69 | |||
70 | /** |
||
71 | * @inheritdoc |
||
72 | */ |
||
73 | 127 | public function createElement($name, $value = null) |
|
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | public function createElementNS($namespaceURI, $qualifiedName, $value = null) |
||
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | */ |
||
92 | 127 | public static function isLoaded() |
|
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | 45 | public function saveHTML() |
|
104 | |||
105 | /** |
||
106 | * @inheritdoc |
||
107 | */ |
||
108 | 2 | public function saveXML($formatOutput = false) |
|
109 | { |
||
110 | 2 | $this->dom->formatOutput = (bool) $formatOutput; |
|
111 | |||
112 | 2 | return trim($this->dom->saveXML()); |
|
113 | } |
||
114 | |||
115 | /** |
||
116 | * @inheritdoc |
||
117 | */ |
||
118 | public function getElement() |
||
122 | |||
123 | /** |
||
124 | * @inheritdoc |
||
125 | */ |
||
126 | public function setNodeValue($value) |
||
130 | |||
131 | /** |
||
132 | * @inheritdoc |
||
133 | */ |
||
134 | public function getNodeValue() |
||
138 | |||
139 | /** |
||
140 | * @inheritdoc |
||
141 | */ |
||
142 | public function removeNode(XMLDocumentInterface $child) |
||
146 | } |