@@ -59,6 +59,10 @@ discard block |
||
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
62 | + /** |
|
63 | + * @param string $xml |
|
64 | + * @param string|null $encoding |
|
65 | + */ |
|
62 | 66 | private function parsePartial( $xml, $encoding ) |
63 | 67 | { |
64 | 68 | // add a known (single) root element with all declared namespaces |
@@ -79,6 +83,9 @@ discard block |
||
79 | 83 | return $result; |
80 | 84 | } |
81 | 85 | |
86 | + /** |
|
87 | + * @param string $xml |
|
88 | + */ |
|
82 | 89 | private function parseFull( $xml, $encoding = null ) |
83 | 90 | { |
84 | 91 | $dom = new \DomDocument(); |
@@ -55,6 +55,9 @@ |
||
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param string $contents |
|
60 | + */ |
|
58 | 61 | protected function escape( $contents ) { |
59 | 62 | $contents = preg_replace('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', '', $contents); |
60 | 63 | return htmlspecialchars( $contents, ENT_XML1, 'UTF-8'); |
@@ -24,6 +24,9 @@ |
||
24 | 24 | |
25 | 25 | private $parser = null; |
26 | 26 | |
27 | + /** |
|
28 | + * @param \SimpleXMLElement $node |
|
29 | + */ |
|
27 | 30 | public function __construct( $node, $parser) { |
28 | 31 | $this->ProxyConstruct( $node ); |
29 | 32 | $this->parser = $parser; |