mirror of
https://github.com/friendica/friendica
synced 2025-04-25 19:10:11 +00:00
Use addons config entries instead of the addon table
This commit is contained in:
parent
cd11088cc4
commit
13b234d279
7 changed files with 294 additions and 39 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue