@@ -46,6 +46,11 @@ discard block |
||
46 | 46 | return $this->writeElementNS((string)$prefix, $localName, $namespaceUri, $content); |
47 | 47 | } |
48 | 48 | |
49 | + /** |
|
50 | + * @param string $prefix |
|
51 | + * @param string $name |
|
52 | + * @param string $namespaceUri |
|
53 | + */ |
|
49 | 54 | public function startElementNS($prefix, $name, $namespaceUri) { |
50 | 55 | $this->_xmlnsStack->push(); |
51 | 56 | if ($this->_xmlnsStack->isDefined($prefix, $namespaceUri)) { |
@@ -58,6 +63,11 @@ discard block |
||
58 | 63 | } |
59 | 64 | } |
60 | 65 | |
66 | + /** |
|
67 | + * @param string $prefix |
|
68 | + * @param string $name |
|
69 | + * @param string $uri |
|
70 | + */ |
|
61 | 71 | public function writeElementNS($prefix, $name, $uri, $content = NULL) { |
62 | 72 | if ($this->_xmlnsStack->isDefined($prefix, $uri)) { |
63 | 73 | parent::writeElement( |
@@ -83,6 +93,10 @@ discard block |
||
83 | 93 | $this->writeAttributeNS($prefix, $name, $this->_namespaces->resolveNamespace($prefix), $value); |
84 | 94 | } |
85 | 95 | |
96 | + /** |
|
97 | + * @param string|false $prefix |
|
98 | + * @param string $uri |
|
99 | + */ |
|
86 | 100 | public function startAttributeNS($prefix, $name, $uri) { |
87 | 101 | if (empty($prefix)) { |
88 | 102 | parent::startAttribute($name); |
@@ -93,6 +107,10 @@ discard block |
||
93 | 107 | } |
94 | 108 | } |
95 | 109 | |
110 | + /** |
|
111 | + * @param string|false $prefix |
|
112 | + * @param string $uri |
|
113 | + */ |
|
96 | 114 | public function writeAttributeNS($prefix, $name, $uri, $content) { |
97 | 115 | if (empty($prefix)) { |
98 | 116 | parent::writeAttribute($name, $content); |
@@ -161,6 +179,9 @@ discard block |
||
161 | 179 | */ |
162 | 180 | private $_namespaces; |
163 | 181 | |
182 | + /** |
|
183 | + * @param NamespaceDefinition $inherit |
|
184 | + */ |
|
164 | 185 | public function __construct($inherit = NULL) { |
165 | 186 | $this->_indent = 0; |
166 | 187 | $this->_namespaces = new \FluentDOM\Namespaces($inherit); |
@@ -185,6 +206,9 @@ discard block |
||
185 | 206 | $this->_namespaces[$prefix] = $namespaceUri; |
186 | 207 | } |
187 | 208 | |
209 | + /** |
|
210 | + * @param string $prefix |
|
211 | + */ |
|
188 | 212 | public function resolveNamespace($prefix) { |
189 | 213 | try { |
190 | 214 | return $this->_namespaces->resolveNamespace($prefix); |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace FluentDOM { |
4 | 4 | |
5 | - use FluentDOM\XMLWriter\NamespaceDefinition; |
|
6 | 5 | use FluentDOM\XMLWriter\NamespaceStack; |
7 | 6 | |
8 | 7 | class XMLWriter extends \XMLWriter { |