Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
44 | protected function composeXML($data, &$xml) |
||
45 | { |
||
46 | foreach ($data as $key => $value) { |
||
47 | if (is_array($value)) { |
||
48 | if (is_numeric($key)) { |
||
49 | $key = 'item'.$key; |
||
50 | } |
||
51 | |||
52 | $subnode = $xml->addChild($key); |
||
53 | $this->composeXML($value, $subnode); |
||
54 | } else { |
||
55 | $xml->addChild("$key", htmlspecialchars("$value")); |
||
56 | } |
||
57 | } |
||
58 | } |
||
59 | } |
||
60 |