From 9b05f37fad88fdf78fdfee9473c27ba5be12abb2 Mon Sep 17 00:00:00 2001 From: Roeland Douma Date: Thu, 12 May 2016 09:43:53 +0200 Subject: lib/private/ocs to PSR-4 (#24558) * Move OC_OCS_XX to legacy * Move \OC\OCS to PSR-4 * OC_OCS_xx to \OC\OCS\xx * Moved OC_OCS_xx to proper namespace * OC_OCS_xx is still there for legacy reasons as a wrapper * No calls to OC_OCS_xx in \OC\OCS\ --- lib/private/OCS/CoreCapabilities.php | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lib/private/OCS/CoreCapabilities.php (limited to 'lib/private/OCS/CoreCapabilities.php') diff --git a/lib/private/OCS/CoreCapabilities.php b/lib/private/OCS/CoreCapabilities.php new file mode 100644 index 00000000000..388a58791b4 --- /dev/null +++ b/lib/private/OCS/CoreCapabilities.php @@ -0,0 +1,58 @@ + + * @author Thomas Müller + * + * @copyright Copyright (c) 2016, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ + +namespace OC\OCS; + +use OCP\Capabilities\ICapability; +use OCP\IConfig; + +/** + * Class Capabilities + * + * @package OC\OCS + */ +class CoreCapabilities implements ICapability { + + /** @var IConfig */ + private $config; + + /** + * @param IConfig $config + */ + public function __construct(IConfig $config) { + $this->config = $config; + } + + /** + * Return this classes capabilities + * + * @return array + */ + public function getCapabilities() { + return [ + 'core' => [ + 'pollinterval' => $this->config->getSystemValue('pollinterval', 60), + 'webdav-root' => $this->config->getSystemValue('webdav-root', 'remote.php/webdav'), + ] + ]; + } +} -- cgit v1.2.3