ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Mock.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\Xml\Element;
4
5use Sabre\Xml;
6
7class 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}
An exception for terminatinating execution or to throw for unit testing.
static xmlDeserialize(Xml\Reader $reader)
The deserialize method is called during xml parsing.
Definition: Mock.php:53
xmlSerialize(Xml\Writer $writer)
The serialize method is called during xml writing.
Definition: Mock.php:24
The Reader class expands upon PHP's built-in XMLReader.
Definition: Reader.php:20
The XML Writer class.
Definition: Writer.php:31
This is the XML element interface.
Definition: Element.php:18