3 namespace Friendica\Core\Config;
6 * Interface for accessing system wide configurations
12 * Loads all configuration values of family into a cached storage.
14 * All configuration values of the system are stored in the cache ( @param string $cat The category of the configuration value
18 function load(string $cat = 'config');
21 * Get a particular user's config variable given the category name
24 * Get a particular config value from the given category ($cat)
25 * and the $key from a cached storage either from the $this->configAdapter
26 * (@see IConfigAdapter) or from the $this->configCache (@see ConfigCache).
28 * @param string $cat The category of the configuration value
29 * @param string $key The configuration key to query
30 * @param mixed $default_value optional, The value to return if key is not set (default: null)
31 * @param boolean $refresh optional, If true the config is loaded from the db and not from the cache (default: false)
33 * @return mixed Stored value or null if it does not exist
35 function get(string $cat, string $key, $default_value = null, bool $refresh = false);
38 * Sets a configuration value for system config
40 * Stores a config value ($value) in the category ($cat) under the key ($key)
42 * Note: Please do not store booleans - convert to 0/1 integer values!
44 * @param string $cat The category of the configuration value
45 * @param string $key The configuration key to set
46 * @param mixed $value The value to store
48 * @return bool Operation success
50 function set(string $cat, string $key, $value);
53 * Deletes the given key from the system configuration.
55 * Removes the configured value from the stored cache in $this->configCache
56 * (@see ConfigCache) and removes it from the database (@see IConfigAdapter).
58 * @param string $cat The category of the configuration value
59 * @param string $key The configuration key to delete
63 function delete(string $cat, string $key);
66 * Returns the Config Cache