0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-01-28 13:50:37 +00:00
nextcloud_server/lib/private/OCS/CoreCapabilities.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2015-07-21 19:44:59 +00:00
<?php
2015-07-21 19:44:59 +00:00
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
2015-07-21 19:44:59 +00:00
*/
namespace OC\OCS;
use OCP\Capabilities\ICapability;
use OCP\IConfig;
use OCP\IURLGenerator;
2015-07-21 19:44:59 +00:00
/**
* Class Capabilities
*
* @package OC\OCS
*/
class CoreCapabilities implements ICapability {
/**
* @param IConfig $config
*/
public function __construct(
private IConfig $config,
) {
2015-07-21 19:44:59 +00:00
}
/**
* Return this classes capabilities
*
* @return array{
* core: array{
* pollinterval: int,
* webdav-root: string,
* reference-api: boolean,
* reference-regex: string,
* mod-rewrite-working: boolean,
* },
* }
2015-07-21 19:44:59 +00:00
*/
public function getCapabilities(): array {
2015-07-21 19:44:59 +00:00
return [
'core' => [
'pollinterval' => $this->config->getSystemValueInt('pollinterval', 60),
'webdav-root' => $this->config->getSystemValueString('webdav-root', 'remote.php/webdav'),
'reference-api' => true,
'reference-regex' => IURLGenerator::URL_REGEX_NO_MODIFIERS,
'mod-rewrite-working' => $this->config->getSystemValueBool('htaccess.IgnoreFrontController') || getenv('front_controller_active') === 'true',
],
2015-07-21 19:44:59 +00:00
];
}
}