ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Uri.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\Xml\Element;
4 
5 use Sabre\Xml;
6 
23 class Uri implements Xml\Element {
24 
30  protected $value;
31 
37  function __construct($value)
38  {
39  $this->value = $value;
40  }
41 
61  function xmlSerialize(Xml\Writer $writer) {
62 
63  $writer->text(
64  \Sabre\Uri\resolve(
65  $writer->contextUri,
66  $this->value
67  )
68  );
69 
70  }
71 
93  static function xmlDeserialize(Xml\Reader $reader) {
94 
95  return new self(
97  $reader->contextUri,
98  $reader->readText()
99  )
100  );
101 
102  }
103 
104 }
__construct($value)
Constructor.
Definition: Uri.php:37
resolve($value)
Returns a Promise that resolves with the given value.
Definition: functions.php:111
Uri element.
Definition: Uri.php:23
xmlSerialize(Xml\Writer $writer)
The xmlSerialize metod is called during xml writing.
Definition: Uri.php:61
The Reader class expands upon PHP&#39;s built-in XMLReader.
Definition: Reader.php:20
static xmlDeserialize(Xml\Reader $reader)
This method is called during xml parsing.
Definition: Uri.php:93
This is the XML element interface.
Definition: Element.php:18
The XML Writer class.
Definition: Writer.php:31