summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php')
-rw-r--r--apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php78
1 files changed, 39 insertions, 39 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
index c1a4337b36b..b95c978cf1a 100644
--- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
+++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
@@ -29,59 +29,59 @@ use Sabre\Xml\XmlDeserializable;
class ShareRequest implements XmlDeserializable {
- public $set = [];
+ public $set = [];
- public $remove = [];
+ public $remove = [];
- /**
- * Constructor
- *
- * @param array $set
- * @param array $remove
- */
- function __construct(array $set, array $remove) {
+ /**
+ * Constructor
+ *
+ * @param array $set
+ * @param array $remove
+ */
+ function __construct(array $set, array $remove) {
- $this->set = $set;
- $this->remove = $remove;
+ $this->set = $set;
+ $this->remove = $remove;
- }
+ }
- static function xmlDeserialize(Reader $reader) {
+ static function xmlDeserialize(Reader $reader) {
- $elements = $reader->parseInnerTree([
- '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
- '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
- ]);
+ $elements = $reader->parseInnerTree([
+ '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
+ ]);
- $set = [];
- $remove = [];
+ $set = [];
+ $remove = [];
- foreach ($elements as $elem) {
- switch ($elem['name']) {
+ foreach ($elements as $elem) {
+ switch ($elem['name']) {
- case '{' . Plugin::NS_OWNCLOUD . '}set' :
- $sharee = $elem['value'];
+ case '{' . Plugin::NS_OWNCLOUD . '}set' :
+ $sharee = $elem['value'];
- $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
- $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
+ $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
+ $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
- $set[] = [
- 'href' => $sharee['{DAV:}href'],
- 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
- 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
- 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
- ];
- break;
+ $set[] = [
+ 'href' => $sharee['{DAV:}href'],
+ 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
+ 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
+ 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
+ ];
+ break;
- case '{' . Plugin::NS_OWNCLOUD . '}remove' :
- $remove[] = $elem['value']['{DAV:}href'];
- break;
+ case '{' . Plugin::NS_OWNCLOUD . '}remove' :
+ $remove[] = $elem['value']['{DAV:}href'];
+ break;
- }
- }
+ }
+ }
- return new self($set, $remove);
+ return new self($set, $remove);
- }
+ }
}