3 * User Configuration Class
5 * @file include/Core/PConfig.php
7 * @brief Contains the class with methods for user configuration
9 namespace Friendica\Core;
14 * @brief Management of user configuration storage
16 * Please do not store booleans - convert to 0/1 integer values
17 * The DI::pConfig()->get() functions return boolean false for keys that are unset,
18 * and this could lead to subtle bugs.
23 * @brief Sets a configuration value for a user
25 * @param int $uid The user_id
26 * @param string $cat The category of the configuration value
27 * @param string $key The configuration key to set
28 * @param mixed $value The value to store
30 * @return bool Operation success
32 public static function set(int $uid, string $cat, string $key, $value)
34 return DI::pConfig()->set($uid, $cat, $key, $value);
38 * @brief Deletes the given key from the users's configuration.
40 * @param int $uid The user_id
41 * @param string $cat The category of the configuration value
42 * @param string $key The configuration key to delete
46 public static function delete(int $uid, string $cat, string $key)
48 return DI::pConfig()->delete($uid, $cat, $key);