diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-07-06 12:19:46 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 11:55:33 +0200 |
commit | 69d3601dcbb17ea9e2d868144159867a79d8e25c (patch) | |
tree | ffe81147304b66465c9bb5669397864f6e56542e /apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php | |
parent | 244de6451b22a1288d3ef698f48fb9c4e78bf15f (diff) | |
download | nextcloud-server-69d3601dcbb17ea9e2d868144159867a79d8e25c.tar.gz nextcloud-server-69d3601dcbb17ea9e2d868144159867a79d8e25c.zip |
Proper work on Publishing
Diffstat (limited to 'apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php new file mode 100644 index 00000000000..597652d0ef1 --- /dev/null +++ b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php @@ -0,0 +1,55 @@ +<?php + +namespace OCA\DAV\CalDAV\Publishing\Xml; + +use OCA\DAV\CalDAV\Publishing\PublishPlugin as Plugin; +use Sabre\Xml\Writer; +use Sabre\Xml\XmlSerializable; + +class Publisher implements XmlSerializable { + + /** + * @var $publishUrl + */ + protected $publishUrl; + + /** + * @param str $publishUrl + */ + function __construct($publishUrl) { + $this->publishUrl = $publishUrl; + } + + /** + * @return str + */ + function getValue() { + return $this->publishUrl; + } + + /** + * The xmlSerialize metod is called during xml writing. + * + * Use the $writer argument to write its own xml serialization. + * + * An important note: do _not_ create a parent element. Any element + * implementing XmlSerializble should only ever write what's considered + * its 'inner xml'. + * + * The parent of the current element is responsible for writing a + * containing element. + * + * This allows serializers to be re-used for different element names. + * + * If you are opening new elements, you must also close them again. + * + * @param Writer $writer + * @return void + */ + function xmlSerialize(Writer $writer) { + + $cs = '{' . Plugin::NS_CALENDARSERVER . '}'; + $writer->write($this->publishUrl); + + } +} |