0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-11 03:29:29 +00:00
nextcloud_server/apps/dav/lib/CalDAV/PublicCalendarRoot.php
provokateurin 381077028a
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +02:00

53 lines
1 KiB
PHP

<?php
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\DAV\CalDAV;
use OCP\IConfig;
use OCP\IL10N;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Collection;
class PublicCalendarRoot extends Collection {
/**
* PublicCalendarRoot constructor.
*
* @param CalDavBackend $caldavBackend
* @param IL10N $l10n
* @param IConfig $config
*/
public function __construct(
protected CalDavBackend $caldavBackend,
protected IL10N $l10n,
protected IConfig $config,
private LoggerInterface $logger,
) {
}
/**
* @inheritdoc
*/
public function getName() {
return 'public-calendars';
}
/**
* @inheritdoc
*/
public function getChild($name) {
$calendar = $this->caldavBackend->getPublicCalendar($name);
return new PublicCalendar($this->caldavBackend, $calendar, $this->l10n, $this->config, $this->logger);
}
/**
* @inheritdoc
*/
public function getChildren() {
return [];
}
}