3 namespace Friendica\Core\Config\Adapter;
7 * @author Hypolite Petovan <hypolite@mrpetovan.com>
9 interface IConfigAdapter
12 * Loads all configuration values into a cached storage.
14 * @param string $cat The category of the configuration values to load
18 public function load($cat = "config");
21 * Get a particular user's config variable given the category name
22 * ($family) and a key.
24 * @param string $cat The category of the configuration value
25 * @param string $key The configuration key to query
27 * @return mixed Stored value or "!<unset>!" if it does not exist
29 public function get($cat, $key);
32 * Stores a config value ($value) in the category ($family) under the key ($key)
33 * for the user_id $uid.
35 * Note: Please do not store booleans - convert to 0/1 integer values!
37 * @param string $cat The category of the configuration value
38 * @param string $key The configuration key to set
39 * @param mixed $value The value to store
41 * @return bool Operation success
43 public function set($cat, $key, $value);
46 * Removes the configured value from the stored cache
47 * and removes it from the database.
49 * @param string $cat The category of the configuration value
50 * @param string $key The configuration key to delete
54 public function delete($cat, $key);
57 * Checks, if the current adapter is connected to the backend
61 public function isConnected();