ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
KeyValue.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\Xml\Element;
4 
5 use Sabre\Xml;
7 
36 class KeyValue implements Xml\Element {
37 
43  protected $value;
44 
50  function __construct(array $value = []) {
51 
52  $this->value = $value;
53 
54  }
55 
75  function xmlSerialize(Xml\Writer $writer) {
76 
77  $writer->write($this->value);
78 
79  }
80 
102  static function xmlDeserialize(Xml\Reader $reader) {
103 
104  return Deserializer\keyValue($reader);
105 
106  }
107 
108 }
&#39;KeyValue&#39; parses out all child elements from a single node, and outputs a key=>value struct...
Definition: KeyValue.php:36
__construct(array $value=[])
Constructor.
Definition: KeyValue.php:50
keyValue(Reader $reader, $namespace=null)
This class provides a number of &#39;deserializer&#39; helper functions.
Definition: functions.php:61
static xmlDeserialize(Xml\Reader $reader)
The deserialize method is called during xml parsing.
Definition: KeyValue.php:102
xmlSerialize(Xml\Writer $writer)
The xmlSerialize metod is called during xml writing.
Definition: KeyValue.php:75
The Reader class expands upon PHP&#39;s built-in XMLReader.
Definition: Reader.php:20
This is the XML element interface.
Definition: Element.php:18
The XML Writer class.
Definition: Writer.php:31