aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php95
1 files changed, 40 insertions, 55 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php b/vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php
index e3881831e..1b24984bd 100644
--- a/vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php
+++ b/vendor/sabre/dav/lib/CalDAV/Principal/ProxyRead.php
@@ -1,12 +1,14 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Principal;
use Sabre\DAV;
use Sabre\DAVACL;
/**
- * ProxyRead principal
+ * ProxyRead principal.
*
* This class represents a principal group, hosted under the main principal.
* This is needed to implement 'Calendar delegation' support. This class is
@@ -16,8 +18,8 @@ use Sabre\DAVACL;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ProxyRead implements IProxyRead {
-
+class ProxyRead implements IProxyRead
+{
/**
* Principal information from the parent principal.
*
@@ -26,7 +28,7 @@ class ProxyRead implements IProxyRead {
protected $principalInfo;
/**
- * Principal backend
+ * Principal backend.
*
* @var DAVACL\PrincipalBackend\BackendInterface
*/
@@ -38,13 +40,12 @@ class ProxyRead implements IProxyRead {
* Note that you MUST supply the parent principal information.
*
* @param DAVACL\PrincipalBackend\BackendInterface $principalBackend
- * @param array $principalInfo
+ * @param array $principalInfo
*/
- function __construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo) {
-
+ public function __construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo)
+ {
$this->principalInfo = $principalInfo;
$this->principalBackend = $principalBackend;
-
}
/**
@@ -52,103 +53,91 @@ class ProxyRead implements IProxyRead {
*
* @return string
*/
- function getName() {
-
+ public function getName()
+ {
return 'calendar-proxy-read';
-
}
/**
- * Returns the last modification time
- *
- * @return null
+ * Returns the last modification time.
*/
- function getLastModified() {
-
+ public function getLastModified()
+ {
return null;
-
}
/**
- * Deletes the current node
+ * Deletes the current node.
*
* @throws DAV\Exception\Forbidden
- * @return void
*/
- function delete() {
-
+ public function delete()
+ {
throw new DAV\Exception\Forbidden('Permission denied to delete node');
-
}
/**
- * Renames the node
+ * Renames the node.
*
* @param string $name The new name
+ *
* @throws DAV\Exception\Forbidden
- * @return void
*/
- function setName($name) {
-
+ public function setName($name)
+ {
throw new DAV\Exception\Forbidden('Permission denied to rename file');
-
}
-
/**
- * Returns a list of alternative urls for a principal
+ * Returns a list of alternative urls for a principal.
*
* This can for example be an email address, or ldap url.
*
* @return array
*/
- function getAlternateUriSet() {
-
+ public function getAlternateUriSet()
+ {
return [];
-
}
/**
- * Returns the full principal url
+ * Returns the full principal url.
*
* @return string
*/
- function getPrincipalUrl() {
-
- return $this->principalInfo['uri'] . '/' . $this->getName();
-
+ public function getPrincipalUrl()
+ {
+ return $this->principalInfo['uri'].'/'.$this->getName();
}
/**
- * Returns the list of group members
+ * Returns the list of group members.
*
* If this principal is a group, this function should return
* all member principal uri's for the group.
*
* @return array
*/
- function getGroupMemberSet() {
-
+ public function getGroupMemberSet()
+ {
return $this->principalBackend->getGroupMemberSet($this->getPrincipalUrl());
-
}
/**
- * Returns the list of groups this principal is member of
+ * Returns the list of groups this principal is member of.
*
* If this principal is a member of a (list of) groups, this function
* should return a list of principal uri's for it's members.
*
* @return array
*/
- function getGroupMembership() {
-
+ public function getGroupMembership()
+ {
return $this->principalBackend->getGroupMembership($this->getPrincipalUrl());
-
}
/**
- * Sets a list of group members
+ * Sets a list of group members.
*
* If this principal is a group, this method sets all the group members.
* The list of members is always overwritten, never appended to.
@@ -156,26 +145,22 @@ class ProxyRead implements IProxyRead {
* This method should throw an exception if the members could not be set.
*
* @param array $principals
- * @return void
*/
- function setGroupMemberSet(array $principals) {
-
+ public function setGroupMemberSet(array $principals)
+ {
$this->principalBackend->setGroupMemberSet($this->getPrincipalUrl(), $principals);
-
}
/**
- * Returns the displayname
+ * Returns the displayname.
*
* This should be a human readable name for the principal.
* If none is available, return the nodename.
*
* @return string
*/
- function getDisplayName() {
-
+ public function getDisplayName()
+ {
return $this->getName();
-
}
-
}