3 namespace Friendica\Core\Config\Cache;
6 * The interface for a user-specific config cache
8 interface IPConfigCache
11 * Tries to load the specified configuration array into the user specific config array.
12 * Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
15 * @param array $config
17 function loadP($uid, array $config);
20 * Retrieves a value from the user config cache
22 * @param int $uid User Id
23 * @param string $cat Config category
24 * @param string $key Config key
26 * @return string The value of the config entry or '!<unset>!' if not set
28 function getP($uid, $cat, $key = null);
31 * Sets a value in the user config cache
33 * Accepts raw output from the pconfig table
35 * @param int $uid User Id
36 * @param string $cat Config category
37 * @param string $key Config key
38 * @param mixed $value Value to set
40 function setP($uid, $cat, $key, $value);
43 * Deletes a value from the user config cache
45 * @param int $uid User Id
46 * @param string $cat Config category
47 * @param string $key Config key
49 * @return bool true, if deleted
51 function deleteP($uid, $cat, $key);
55 * Checks if a value is set in the user config cache.
57 * @param int $uid User Id
58 * @param string $cat Config category
59 * @param string $key Config key
62 function hasP($uid, $cat, $key = null);
65 * Returns the whole configuration cache