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).
34 * Note: Please do not store booleans - convert to 0/1 integer values!
36 * @param string $cat The category of the configuration value
37 * @param string $key The configuration key to set
38 * @param mixed $value The value to store
40 * @return bool Operation success
42 public function set($cat, $key, $value);
45 * Removes the configured value from the stored cache
46 * and removes it from the database.
48 * @param string $cat The category of the configuration value
49 * @param string $key The configuration key to delete
53 public function delete($cat, $key);
56 * Checks, if the current adapter is connected to the backend
60 public function isConnected();
63 * Checks, if a config value ($value) in the category ($cat) is already loaded.
65 * @param string $cat The configuration category
66 * @param string $key The configuration key
70 public function isLoaded($cat, $key);