Use addons config entries instead of the addon table

This commit is contained in:
Philipp 2023-01-03 20:24:48 +01:00
parent cd11088cc4
commit 13b234d279
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
7 changed files with 294 additions and 39 deletions

View file

@ -47,8 +47,8 @@ interface IManageConfigValues
*
* Get a particular config value from the given category ($cat)
*
* @param string $cat The category of the configuration value
* @param string $key The configuration key to query
* @param string $cat The category of the configuration value
* @param ?string $key The configuration key to query (if null, the whole array at the category will get returned)
* @param mixed $default_value Deprecated, use `Config->get($cat, $key, null, $refresh) ?? $default_value` instead
*
* @return mixed Stored value or null if it does not exist
@ -56,7 +56,7 @@ interface IManageConfigValues
* @throws ConfigPersistenceException In case the persistence layer throws errors
*
*/
public function get(string $cat, string $key, $default_value = null);
public function get(string $cat, string $key = null, $default_value = null);
/**
* Load all configuration values from a given cache and saves it back in the configuration node store

View file

@ -102,7 +102,7 @@ class Config implements IManageConfigValues
}
/** {@inheritDoc} */
public function get(string $cat, string $key, $default_value = null)
public function get(string $cat, string $key = null, $default_value = null)
{
return $this->configCache->get($cat, $key) ?? $default_value;
}