aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Writer.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-04-25 08:52:50 +0200
committerMario Vavti <mario@mariovavti.com>2019-04-25 08:52:50 +0200
commite779335d060b3a51d6a144d23af4097ae6801473 (patch)
tree2427765313f715a0e5b48228abe5200cb82b787f /vendor/sabre/vobject/lib/Writer.php
parente937e8fff96a935b14a479c062f6b0d00b90b99d (diff)
downloadvolse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.tar.gz
volse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.tar.bz2
volse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.zip
update composer libs
Diffstat (limited to 'vendor/sabre/vobject/lib/Writer.php')
-rw-r--r--vendor/sabre/vobject/lib/Writer.php30
1 files changed, 11 insertions, 19 deletions
diff --git a/vendor/sabre/vobject/lib/Writer.php b/vendor/sabre/vobject/lib/Writer.php
index f8a58758d..c70a6ae4d 100644
--- a/vendor/sabre/vobject/lib/Writer.php
+++ b/vendor/sabre/vobject/lib/Writer.php
@@ -14,8 +14,8 @@ use Sabre\Xml;
* @author Ivan Enderlin
* @license http://sabre.io/license/ Modified BSD License
*/
-class Writer {
-
+class Writer
+{
/**
* Serializes a vCard or iCalendar object.
*
@@ -23,24 +23,22 @@ class Writer {
*
* @return string
*/
- static function write(Component $component) {
-
+ public static function write(Component $component)
+ {
return $component->serialize();
-
}
/**
* Serializes a jCal or jCard object.
*
* @param Component $component
- * @param int $options
+ * @param int $options
*
* @return string
*/
- static function writeJson(Component $component, $options = 0) {
-
+ public static function writeJson(Component $component, $options = 0)
+ {
return json_encode($component, $options);
-
}
/**
@@ -50,8 +48,8 @@ class Writer {
*
* @return string
*/
- static function writeXml(Component $component) {
-
+ public static function writeXml(Component $component)
+ {
$writer = new Xml\Writer();
$writer->openMemory();
$writer->setIndent(true);
@@ -59,15 +57,11 @@ class Writer {
$writer->startDocument('1.0', 'utf-8');
if ($component instanceof Component\VCalendar) {
-
$writer->startElement('icalendar');
- $writer->writeAttribute('xmlns', Parser\Xml::XCAL_NAMESPACE);
-
+ $writer->writeAttribute('xmlns', Parser\XML::XCAL_NAMESPACE);
} else {
-
$writer->startElement('vcards');
- $writer->writeAttribute('xmlns', Parser\Xml::XCARD_NAMESPACE);
-
+ $writer->writeAttribute('xmlns', Parser\XML::XCARD_NAMESPACE);
}
$component->xmlSerialize($writer);
@@ -75,7 +69,5 @@ class Writer {
$writer->endElement();
return $writer->outputMemory();
-
}
-
}