Add public access modifier to all methods
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
c2d1e6e7ff
commit
62ef59616d
|
@ -107,7 +107,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
return $this->calendarInfo['principaluri'];
|
return $this->calendarInfo['principaluri'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getACL() {
|
public function getACL() {
|
||||||
$acl = [
|
$acl = [
|
||||||
[
|
[
|
||||||
'privilege' => '{DAV:}read',
|
'privilege' => '{DAV:}read',
|
||||||
|
@ -152,18 +152,18 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
return $calDavBackend->applyShareAcl($this->getResourceId(), $acl);
|
return $calDavBackend->applyShareAcl($this->getResourceId(), $acl);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChildACL() {
|
public function getChildACL() {
|
||||||
return $this->getACL();
|
return $this->getACL();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOwner() {
|
public function getOwner() {
|
||||||
if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) {
|
if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) {
|
||||||
return $this->calendarInfo['{http://owncloud.org/ns}owner-principal'];
|
return $this->calendarInfo['{http://owncloud.org/ns}owner-principal'];
|
||||||
}
|
}
|
||||||
return parent::getOwner();
|
return parent::getOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete() {
|
public function delete() {
|
||||||
if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal']) &&
|
if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal']) &&
|
||||||
$this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) {
|
$this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) {
|
||||||
$principal = 'principal:' . parent::getOwner();
|
$principal = 'principal:' . parent::getOwner();
|
||||||
|
@ -185,7 +185,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
parent::delete();
|
parent::delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
function propPatch(PropPatch $propPatch) {
|
public function propPatch(PropPatch $propPatch) {
|
||||||
// parent::propPatch will only update calendars table
|
// parent::propPatch will only update calendars table
|
||||||
// if calendar is shared, changes have to be made to the properties table
|
// if calendar is shared, changes have to be made to the properties table
|
||||||
if (!$this->isShared()) {
|
if (!$this->isShared()) {
|
||||||
|
@ -193,7 +193,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChild($name) {
|
public function getChild($name) {
|
||||||
|
|
||||||
$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
|
$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChildren() {
|
public function getChildren() {
|
||||||
|
|
||||||
$objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
|
$objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
|
||||||
$children = [];
|
$children = [];
|
||||||
|
@ -226,7 +226,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMultipleChildren(array $paths) {
|
public function getMultipleChildren(array $paths) {
|
||||||
|
|
||||||
$objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
|
$objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
|
||||||
$children = [];
|
$children = [];
|
||||||
|
@ -241,7 +241,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function childExists($name) {
|
public function childExists($name) {
|
||||||
$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
|
$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
|
||||||
if (!$obj) {
|
if (!$obj) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -253,7 +253,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calendarQuery(array $filters) {
|
public function calendarQuery(array $filters) {
|
||||||
|
|
||||||
$uris = $this->caldavBackend->calendarQuery($this->calendarInfo['id'], $filters);
|
$uris = $this->caldavBackend->calendarQuery($this->calendarInfo['id'], $filters);
|
||||||
if ($this->isShared()) {
|
if ($this->isShared()) {
|
||||||
|
@ -269,7 +269,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
* @param boolean $value
|
* @param boolean $value
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
function setPublishStatus($value) {
|
public function setPublishStatus($value) {
|
||||||
$publicUri = $this->caldavBackend->setPublishStatus($value, $this);
|
$publicUri = $this->caldavBackend->setPublishStatus($value, $this);
|
||||||
$this->calendarInfo['publicuri'] = $publicUri;
|
$this->calendarInfo['publicuri'] = $publicUri;
|
||||||
return $publicUri;
|
return $publicUri;
|
||||||
|
@ -278,7 +278,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
|
||||||
/**
|
/**
|
||||||
* @return mixed $value
|
* @return mixed $value
|
||||||
*/
|
*/
|
||||||
function getPublishStatus() {
|
public function getPublishStatus() {
|
||||||
return $this->caldavBackend->getPublishStatus($this);
|
return $this->caldavBackend->getPublishStatus($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
|
||||||
* @return void
|
* @return void
|
||||||
* @throws Forbidden
|
* @throws Forbidden
|
||||||
*/
|
*/
|
||||||
function updateShares(array $add, array $remove) {
|
public function updateShares(array $add, array $remove) {
|
||||||
if ($this->isShared()) {
|
if ($this->isShared()) {
|
||||||
throw new Forbidden();
|
throw new Forbidden();
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getShares() {
|
public function getShares() {
|
||||||
if ($this->isShared()) {
|
if ($this->isShared()) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
|
||||||
return $carddavBackend->getShares($this->getResourceId());
|
return $carddavBackend->getShares($this->getResourceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getACL() {
|
public function getACL() {
|
||||||
$acl = [
|
$acl = [
|
||||||
[
|
[
|
||||||
'privilege' => '{DAV:}read',
|
'privilege' => '{DAV:}read',
|
||||||
|
@ -139,11 +139,11 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
|
||||||
return $carddavBackend->applyShareAcl($this->getResourceId(), $acl);
|
return $carddavBackend->applyShareAcl($this->getResourceId(), $acl);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChildACL() {
|
public function getChildACL() {
|
||||||
return $this->getACL();
|
return $this->getACL();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChild($name) {
|
public function getChild($name) {
|
||||||
|
|
||||||
$obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
|
$obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
|
||||||
if (!$obj) {
|
if (!$obj) {
|
||||||
|
@ -161,14 +161,14 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
|
||||||
return $this->addressBookInfo['id'];
|
return $this->addressBookInfo['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOwner() {
|
public function getOwner() {
|
||||||
if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
|
if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
|
||||||
return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'];
|
return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'];
|
||||||
}
|
}
|
||||||
return parent::getOwner();
|
return parent::getOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete() {
|
public function delete() {
|
||||||
if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
|
if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
|
||||||
$principal = 'principal:' . parent::getOwner();
|
$principal = 'principal:' . parent::getOwner();
|
||||||
$shares = $this->carddavBackend->getShares($this->getResourceId());
|
$shares = $this->carddavBackend->getShares($this->getResourceId());
|
||||||
|
@ -189,7 +189,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
|
||||||
parent::delete();
|
parent::delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
function propPatch(PropPatch $propPatch) {
|
public function propPatch(PropPatch $propPatch) {
|
||||||
if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
|
if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
|
||||||
throw new Forbidden();
|
throw new Forbidden();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue