mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
Refactor IManageConfigValues interface
This commit is contained in:
parent
326566638f
commit
1e574d5383
13 changed files with 46 additions and 49 deletions
|
@ -30,36 +30,32 @@ use Friendica\Core\Config\ValueObject\Cache;
|
|||
interface IManageConfigValues
|
||||
{
|
||||
/**
|
||||
* Loads all configuration values of family into a cached storage.
|
||||
* Reloads all configuration values (from filesystem and environment variables)
|
||||
*
|
||||
* All configuration values of the system are stored in the cache.
|
||||
*
|
||||
* @param string $cat The category of the configuration value
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws ConfigPersistenceException In case the persistence layer throws errors
|
||||
*/
|
||||
public function load(string $cat = 'config');
|
||||
public function reload();
|
||||
|
||||
/**
|
||||
* Get a particular user's config variable given the category name
|
||||
* ($cat) and a $key.
|
||||
*
|
||||
* Get a particular config value from the given category ($cat)
|
||||
* and the $key from a cached storage either from the database or from the cache.
|
||||
*
|
||||
* @param string $cat The category of the configuration value
|
||||
* @param string $key The configuration key to query
|
||||
* @param mixed $default_value Deprecated, use `Config->get($cat, $key, null, $refresh) ?? $default_value` instead
|
||||
* @param boolean $refresh optional, If true the config is loaded from the db and not from the cache (default: false)
|
||||
*
|
||||
* @return mixed Stored value or null if it does not exist
|
||||
*
|
||||
* @throws ConfigPersistenceException In case the persistence layer throws errors
|
||||
*
|
||||
*/
|
||||
public function get(string $cat, string $key, $default_value = null, bool $refresh = false);
|
||||
public function get(string $cat, string $key, $default_value = null);
|
||||
|
||||
/**
|
||||
* Sets a configuration value for system config
|
||||
|
@ -81,6 +77,8 @@ interface IManageConfigValues
|
|||
|
||||
/**
|
||||
* Save back the overridden values of the config cache
|
||||
*
|
||||
* @throws ConfigPersistenceException In case the persistence layer throws errors
|
||||
*/
|
||||
public function save();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue