aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Services
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/Services')
-rw-r--r--lib/private/AppFramework/Services/AppConfig.php41
-rw-r--r--lib/private/AppFramework/Services/InitialState.php21
2 files changed, 18 insertions, 44 deletions
diff --git a/lib/private/AppFramework/Services/AppConfig.php b/lib/private/AppFramework/Services/AppConfig.php
index d3dfd3d362b..04d97738483 100644
--- a/lib/private/AppFramework/Services/AppConfig.php
+++ b/lib/private/AppFramework/Services/AppConfig.php
@@ -3,26 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * 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
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\AppFramework\Services;
@@ -134,7 +116,7 @@ class AppConfig implements IAppConfig {
string $key,
string $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueString($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -156,7 +138,7 @@ class AppConfig implements IAppConfig {
string $key,
int $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueInt($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -178,7 +160,7 @@ class AppConfig implements IAppConfig {
string $key,
float $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueFloat($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -198,7 +180,7 @@ class AppConfig implements IAppConfig {
public function setAppValueBool(
string $key,
bool $value,
- bool $lazy = false
+ bool $lazy = false,
): bool {
return $this->appConfig->setValueBool($this->appName, $key, $value, $lazy);
}
@@ -221,7 +203,7 @@ class AppConfig implements IAppConfig {
string $key,
array $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueArray($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -355,4 +337,13 @@ class AppConfig implements IAppConfig {
public function deleteUserValue(string $userId, string $key): void {
$this->config->deleteUserValue($userId, $this->appName, $key);
}
+
+ /**
+ * Returns the installed versions of all apps
+ *
+ * @return array<string, string>
+ */
+ public function getAppInstalledVersions(bool $onlyEnabled = false): array {
+ return $this->appConfig->getAppInstalledVersions($onlyEnabled);
+ }
}
diff --git a/lib/private/AppFramework/Services/InitialState.php b/lib/private/AppFramework/Services/InitialState.php
index 9a44db606ea..da225b612cf 100644
--- a/lib/private/AppFramework/Services/InitialState.php
+++ b/lib/private/AppFramework/Services/InitialState.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * 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
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\AppFramework\Services;