3 namespace Friendica\Core\Config\Adapter;
7 * @author Hypolite Petovan <hypolite@mrpetovan.com>
9 interface IConfigAdapter
12 * Loads all configuration values and returns the loaded category as an array.
14 * @param string $cat The category of the configuration values to load
18 public function load($cat = "config");
21 * Get a particular system-wide config variable given the category name
22 * ($family) and a key.
24 * Note: Boolean variables are defined as 0/1 in the database
26 * @param string $cat The category of the configuration value
27 * @param string $key The configuration key to query
29 * @return null|mixed Stored value or null if it does not exist
31 public function get($cat, $key);
34 * Stores a config value ($value) in the category ($family) under the key ($key).
36 * Note: Please do not store booleans - convert to 0/1 integer values!
38 * @param string $cat The category of the configuration value
39 * @param string $key The configuration key to set
40 * @param mixed $value The value to store
42 * @return bool Operation success
44 public function set($cat, $key, $value);
47 * Removes the configured value from the stored cache
48 * and removes it from the database.
50 * @param string $cat The category of the configuration value
51 * @param string $key The configuration key to delete
53 * @return bool Operation success
55 public function delete($cat, $key);
58 * Checks, if the current adapter is connected to the backend
62 public function isConnected();
65 * Checks, if a config key ($key) in the category ($cat) is already loaded.
67 * @param string $cat The configuration category
68 * @param string $key The configuration key
72 public function isLoaded($cat, $key);