ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AddressData.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
24 class AddressData implements XmlDeserializable {
25 
47  static function xmlDeserialize(Reader $reader) {
48 
49  $result = [
50  'contentType' => $reader->getAttribute('content-type') ?: 'text/vcard',
51  'version' => $reader->getAttribute('version') ?: '3.0',
52  ];
53 
54  $elems = (array)$reader->parseInnerTree();
55  $result['addressDataProperties'] = array_map(function($element) {
56  return $element['attributes']['name'];
57  }, $elems);
58 
59  return $result;
60 
61  }
62 
63 }
parseInnerTree(array $elementMap=null)
Parses all elements below the current element.
Definition: Reader.php:129
$result
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
Definition: AddressData.php:47
The Reader class expands upon PHP&#39;s built-in XMLReader.
Definition: Reader.php:20
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...