aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AllConfig.php
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-01-11 15:32:58 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-01-15 15:45:13 -0100
commitf7d0c74b1003af6c47dd6ec74f4ef904a2681d62 (patch)
treea0bfe1934fbec0ccf6651824589a0e67ae4f9d9f /lib/private/AllConfig.php
parente5ef58b7b9b8f7a232666df17d286d43fb4d1201 (diff)
downloadnextcloud-server-f7d0c74b1003af6c47dd6ec74f4ef904a2681d62.tar.gz
nextcloud-server-f7d0c74b1003af6c47dd6ec74f4ef904a2681d62.zip
lazy AppConfig
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/private/AllConfig.php')
-rw-r--r--lib/private/AllConfig.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index 92178d64635..ab4359c798f 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -43,7 +43,6 @@ use OCP\PreConditionNotMetException;
* Class to combine all the configuration options ownCloud offers
*/
class AllConfig implements IConfig {
- private SystemConfig $systemConfig;
private ?IDBConnection $connection = null;
/**
@@ -68,9 +67,10 @@ class AllConfig implements IConfig {
*/
private CappedMemoryCache $userCache;
- public function __construct(SystemConfig $systemConfig) {
+ public function __construct(
+ private SystemConfig $systemConfig
+ ) {
$this->userCache = new CappedMemoryCache();
- $this->systemConfig = $systemConfig;
}
/**
@@ -190,6 +190,7 @@ class AllConfig implements IConfig {
*
* @param string $appName the appName that we stored the value under
* @return string[] the keys stored for the app
+ * @deprecated 29.0.0 Use {@see IAppConfig} directly
*/
public function getAppKeys($appName) {
return \OC::$server->get(AppConfig::class)->getKeys($appName);
@@ -201,6 +202,7 @@ class AllConfig implements IConfig {
* @param string $appName the appName that we want to store the value under
* @param string $key the key of the value, under which will be saved
* @param string|float|int $value the value that should be stored
+ * @deprecated 29.0.0 Use {@see IAppConfig} directly
*/
public function setAppValue($appName, $key, $value) {
\OC::$server->get(AppConfig::class)->setValue($appName, $key, $value);
@@ -213,6 +215,7 @@ class AllConfig implements IConfig {
* @param string $key the key of the value, under which it was saved
* @param string $default the default value to be returned if the value isn't set
* @return string the saved value
+ * @deprecated 29.0.0 Use {@see IAppConfig} directly
*/
public function getAppValue($appName, $key, $default = '') {
return \OC::$server->get(AppConfig::class)->getValue($appName, $key, $default);
@@ -223,6 +226,7 @@ class AllConfig implements IConfig {
*
* @param string $appName the appName that we stored the value under
* @param string $key the key of the value, under which it was saved
+ * @deprecated 29.0.0 Use {@see IAppConfig} directly
*/
public function deleteAppValue($appName, $key) {
\OC::$server->get(AppConfig::class)->deleteKey($appName, $key);
@@ -232,6 +236,7 @@ class AllConfig implements IConfig {
* Removes all keys in appconfig belonging to the app
*
* @param string $appName the appName the configs are stored under
+ * @deprecated 29.0.0 Use {@see IAppConfig} directly
*/
public function deleteAppValues($appName) {
\OC::$server->get(AppConfig::class)->deleteApp($appName);