aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-12-04 10:25:11 +0000
committerMario <mario@mariovavti.com>2019-12-04 10:25:11 +0000
commitbde429cff649237984903a252ba1a718e6d74f53 (patch)
treeb2b2570159cfb37689e6ce3b96c3b1b988d676cc /vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
parentcc9f41df5f83bcab435d6fb941b5a8f5b1457037 (diff)
parent4c8d33d1eb2a804aa70a7bc677d6c73d0d94816b (diff)
downloadvolse-hubzilla-4.6.tar.gz
volse-hubzilla-4.6.tar.bz2
volse-hubzilla-4.6.zip
Merge branch '4.6RC'4.6
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/SharedCalendar.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/SharedCalendar.php84
1 files changed, 37 insertions, 47 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php b/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
index 7a77616e3..818392f57 100644
--- a/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
+++ b/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV;
use Sabre\DAV\Sharing\Plugin as SPlugin;
@@ -11,8 +13,8 @@ use Sabre\DAV\Sharing\Plugin as SPlugin;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SharedCalendar extends Calendar implements ISharedCalendar {
-
+class SharedCalendar extends Calendar implements ISharedCalendar
+{
/**
* Returns the 'access level' for the instance of this shared resource.
*
@@ -21,10 +23,9 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return int
*/
- function getShareAccess() {
-
+ public function getShareAccess()
+ {
return isset($this->calendarInfo['share-access']) ? $this->calendarInfo['share-access'] : SPlugin::ACCESS_NOTSHARED;
-
}
/**
@@ -38,10 +39,9 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return string
*/
- function getShareResourceUri() {
-
+ public function getShareResourceUri()
+ {
return $this->calendarInfo['share-resource-uri'];
-
}
/**
@@ -50,12 +50,10 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
* Every item must be a Sharee object.
*
* @param \Sabre\DAV\Xml\Element\Sharee[] $sharees
- * @return void
*/
- function updateInvites(array $sharees) {
-
+ public function updateInvites(array $sharees)
+ {
$this->caldavBackend->updateInvites($this->calendarInfo['id'], $sharees);
-
}
/**
@@ -74,10 +72,9 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return \Sabre\DAV\Xml\Element\Sharee[]
*/
- function getInvites() {
-
+ public function getInvites()
+ {
return $this->caldavBackend->getInvites($this->calendarInfo['id']);
-
}
/**
@@ -87,12 +84,10 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
* subscribable calendar.
*
* @param bool $value
- * @return void
*/
- function setPublishStatus($value) {
-
+ public function setPublishStatus($value)
+ {
$this->caldavBackend->setPublishStatus($this->calendarInfo['id'], $value);
-
}
/**
@@ -107,13 +102,13 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return array
*/
- function getACL() {
-
+ public function getACL()
+ {
$acl = [];
switch ($this->getShareAccess()) {
- case SPlugin::ACCESS_NOTSHARED :
- case SPlugin::ACCESS_SHAREDOWNER :
+ case SPlugin::ACCESS_NOTSHARED:
+ case SPlugin::ACCESS_SHAREDOWNER:
$acl[] = [
'privilege' => '{DAV:}share',
'principal' => $this->calendarInfo['principaluri'],
@@ -121,11 +116,11 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}share',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
- // No break intentional!
- case SPlugin::ACCESS_READWRITE :
+ // no break intentional!
+ case SPlugin::ACCESS_READWRITE:
$acl[] = [
'privilege' => '{DAV:}write',
'principal' => $this->calendarInfo['principaluri'],
@@ -133,11 +128,11 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}write',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
- // No break intentional!
- case SPlugin::ACCESS_READ :
+ // no break intentional!
+ case SPlugin::ACCESS_READ:
$acl[] = [
'privilege' => '{DAV:}write-properties',
'principal' => $this->calendarInfo['principaluri'],
@@ -145,7 +140,7 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}write-properties',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
$acl[] = [
@@ -155,26 +150,25 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-read',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-read',
'protected' => true,
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
$acl[] = [
- 'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy',
+ 'privilege' => '{'.Plugin::NS_CALDAV.'}read-free-busy',
'principal' => '{DAV:}authenticated',
'protected' => true,
];
break;
}
- return $acl;
+ return $acl;
}
-
/**
* This method returns the ACL's for calendar objects in this calendar.
* The result of this method automatically gets passed to the
@@ -182,15 +176,13 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return array
*/
- function getChildACL() {
-
+ public function getChildACL()
+ {
$acl = [];
switch ($this->getShareAccess()) {
- case SPlugin::ACCESS_NOTSHARED :
- // No break intentional
- case SPlugin::ACCESS_SHAREDOWNER :
- // No break intentional
+ case SPlugin::ACCESS_NOTSHARED:
+ case SPlugin::ACCESS_SHAREDOWNER:
case SPlugin::ACCESS_READWRITE:
$acl[] = [
'privilege' => '{DAV:}write',
@@ -199,10 +191,10 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}write',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
- // No break intentional
+ // no break intentional
case SPlugin::ACCESS_READ:
$acl[] = [
'privilege' => '{DAV:}read',
@@ -211,19 +203,17 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-read',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-read',
'protected' => true,
];
break;
}
return $acl;
-
}
-
}