aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php78
1 files changed, 28 insertions, 50 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php b/vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php
index 0cd05a965..d34c92327 100644
--- a/vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php
+++ b/vendor/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php
@@ -1,35 +1,23 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Schedule;
use Sabre\CalDAV\Backend;
use Sabre\DAV\Exception\MethodNotAllowed;
/**
- * The SchedulingObject represents a scheduling object in the Inbox collection
+ * The SchedulingObject represents a scheduling object in the Inbox collection.
*
* @author Brett (https://github.com/bretten)
* @license http://sabre.io/license/ Modified BSD License
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
*/
-class SchedulingObject extends \Sabre\CalDAV\CalendarObject implements ISchedulingObject {
-
- /**
- /* The CalDAV backend
- *
- * @var Backend\SchedulingSupport
- */
- protected $caldavBackend;
-
- /**
- * Array with information about this SchedulingObject
- *
- * @var array
- */
- protected $objectData;
-
+class SchedulingObject extends \Sabre\CalDAV\CalendarObject implements ISchedulingObject
+{
/**
- * Constructor
+ * Constructor.
*
* The following properties may be passed within $objectData:
*
@@ -43,73 +31,65 @@ class SchedulingObject extends \Sabre\CalDAV\CalendarObject implements IScheduli
* * acl - (optional) Use this to override the default ACL for the node.
*
* @param Backend\SchedulingSupport $caldavBackend
- * @param array $objectData
+ * @param array $objectData
*/
- function __construct(Backend\SchedulingSupport $caldavBackend, array $objectData) {
-
- $this->caldavBackend = $caldavBackend;
+ public function __construct(Backend\SchedulingSupport $caldavBackend, array $objectData)
+ {
+ parent::__construct($caldavBackend, [], $objectData);
if (!isset($objectData['uri'])) {
throw new \InvalidArgumentException('The objectData argument must contain an \'uri\' property');
}
-
- $this->objectData = $objectData;
-
}
/**
- * Returns the ICalendar-formatted object
+ * Returns the ICalendar-formatted object.
*
* @return string
*/
- function get() {
-
+ public function get()
+ {
// Pre-populating the 'calendardata' is optional, if we don't have it
// already we fetch it from the backend.
if (!isset($this->objectData['calendardata'])) {
$this->objectData = $this->caldavBackend->getSchedulingObject($this->objectData['principaluri'], $this->objectData['uri']);
}
- return $this->objectData['calendardata'];
+ return $this->objectData['calendardata'];
}
/**
- * Updates the ICalendar-formatted object
+ * Updates the ICalendar-formatted object.
*
* @param string|resource $calendarData
+ *
* @return string
*/
- function put($calendarData) {
-
+ public function put($calendarData)
+ {
throw new MethodNotAllowed('Updating scheduling objects is not supported');
-
}
/**
- * Deletes the scheduling message
- *
- * @return void
+ * Deletes the scheduling message.
*/
- function delete() {
-
+ public function delete()
+ {
$this->caldavBackend->deleteSchedulingObject($this->objectData['principaluri'], $this->objectData['uri']);
-
}
/**
- * Returns the owner principal
+ * Returns the owner principal.
*
* This must be a url to a principal, or null if there's no owner
*
* @return string|null
*/
- function getOwner() {
-
+ public function getOwner()
+ {
return $this->objectData['principaluri'];
-
}
-
/**
* Returns a list of ACE's for this node.
*
@@ -122,8 +102,8 @@ class SchedulingObject extends \Sabre\CalDAV\CalendarObject implements IScheduli
*
* @return array
*/
- function getACL() {
-
+ public function getACL()
+ {
// An alternative acl may be specified in the object data.
//
@@ -140,16 +120,14 @@ class SchedulingObject extends \Sabre\CalDAV\CalendarObject implements IScheduli
],
[
'privilege' => '{DAV:}all',
- 'principal' => $this->objectData['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->objectData['principaluri'].'/calendar-proxy-write',
'protected' => true,
],
[
'privilege' => '{DAV:}read',
- 'principal' => $this->objectData['principaluri'] . '/calendar-proxy-read',
+ 'principal' => $this->objectData['principaluri'].'/calendar-proxy-read',
'protected' => true,
],
];
-
}
-
}