ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Mock.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\Xml\Element;
4 
5 use Sabre\Xml;
6 
7 class Mock implements Xml\Element {
8 
24  function xmlSerialize(Xml\Writer $writer) {
25 
26  $writer->startElement('{http://sabredav.org/ns}elem1');
27  $writer->write('hiiii!');
28  $writer->endElement();
29 
30  }
31 
53  static function xmlDeserialize(Xml\Reader $reader) {
54 
55  $reader->next();
56  return 'foobar';
57 
58  }
59 
60 }
xmlSerialize(Xml\Writer $writer)
The serialize method is called during xml writing.
Definition: Mock.php:24
The Reader class expands upon PHP&#39;s built-in XMLReader.
Definition: Reader.php:20
static xmlDeserialize(Xml\Reader $reader)
The deserialize method is called during xml parsing.
Definition: Mock.php:53
This is the XML element interface.
Definition: Element.php:18
The XML Writer class.
Definition: Writer.php:31