@@ 31-45 (lines=15) @@ | ||
28 | ); |
|
29 | } |
|
30 | ||
31 | public function simpleListOfToXml(XmlSerializationVisitor $visitor, $object, array $type, Context $context) |
|
32 | { |
|
33 | ||
34 | $newType = array( |
|
35 | 'name' => $type["params"][0]["name"], |
|
36 | 'params' => array() |
|
37 | ); |
|
38 | ||
39 | $ret = array(); |
|
40 | foreach ($object as $v) { |
|
41 | $ret[] = $context->accept($v, $newType)->data; |
|
42 | } |
|
43 | ||
44 | return $visitor->getDocument()->createTextNode(implode(" ", $ret)); |
|
45 | } |
|
46 | ||
47 | public function simpleListOfFromXml(XmlDeserializationVisitor $visitor, $node, array $type, Context $context) |
|
48 | { |
|
@@ 47-58 (lines=12) @@ | ||
44 | return $visitor->getDocument()->createTextNode(implode(" ", $ret)); |
|
45 | } |
|
46 | ||
47 | public function simpleListOfFromXml(XmlDeserializationVisitor $visitor, $node, array $type, Context $context) |
|
48 | { |
|
49 | $newType = array( |
|
50 | 'name' => $type["params"][0]["name"], |
|
51 | 'params' => array() |
|
52 | ); |
|
53 | $ret = array(); |
|
54 | foreach (explode(" ", (string)$node) as $v) { |
|
55 | $ret[] = $context->accept($v, $newType); |
|
56 | } |
|
57 | return $ret; |
|
58 | } |
|
59 | } |
|
60 | ||
61 |