aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-28 21:45:14 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-28 21:45:14 +0200
commitdcc65bbacb81801b5e138795c18ef9e740dbd26c (patch)
tree52f0e3879dac66ee7879abeb8c6db9cd6eb0b33c /vendor/sabre/dav/lib/CalDAV/Xml
parentfeaad50b6c10cd19cffb63609d6eeada3d185fd7 (diff)
downloadvolse-hubzilla-dcc65bbacb81801b5e138795c18ef9e740dbd26c.tar.gz
volse-hubzilla-dcc65bbacb81801b5e138795c18ef9e740dbd26c.tar.bz2
volse-hubzilla-dcc65bbacb81801b5e138795c18ef9e740dbd26c.zip
update to sabre/dav to version 3.2.0
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Xml')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php22
1 files changed, 6 insertions, 16 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
index 4a253e008..a82b8eff7 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
@@ -4,8 +4,8 @@ namespace Sabre\CalDAV\Xml\Property;
use Sabre\Xml\Element;
use Sabre\Xml\Reader;
+use Sabre\Xml\Deserializer;
use Sabre\Xml\Writer;
-use Sabre\Xml\Element\Elements;
use Sabre\CalDAV\Plugin;
/**
@@ -116,23 +116,13 @@ class ScheduleCalendarTransp implements Element {
*/
static function xmlDeserialize(Reader $reader) {
- $elems = Elements::xmlDeserialize($reader);
+ $elems = Deserializer\enum($reader, Plugin::NS_CALDAV);
- $value = null;
-
- foreach ($elems as $elem) {
- switch ($elem) {
- case '{' . Plugin::NS_CALDAV . '}opaque' :
- $value = self::OPAQUE;
- break;
- case '{' . Plugin::NS_CALDAV . '}transparent' :
- $value = self::TRANSPARENT;
- break;
- }
+ if (in_array('transparent', $elems)) {
+ $value = self::TRANSPARENT;
+ } else {
+ $value = self::OPAQUE;
}
- if (is_null($value))
- return null;
-
return new self($value);
}