]> git.mxchange.org Git - friendica.git/blob - src/Core/PConfig.php
Move PConfig::set() to DI::pConfig()->set()
[friendica.git] / src / Core / PConfig.php
1 <?php
2 /**
3  * User Configuration Class
4  *
5  * @file include/Core/PConfig.php
6  *
7  * @brief Contains the class with methods for user configuration
8  */
9 namespace Friendica\Core;
10
11 use Friendica\DI;
12
13 /**
14  * @brief Management of user configuration storage
15  * Note:
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.
19  */
20 class PConfig
21 {
22         /**
23          * @brief Deletes the given key from the users's configuration.
24          *
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 delete
28          *
29          * @return bool
30          */
31         public static function delete(int $uid, string $cat, string $key)
32         {
33                 return DI::pConfig()->delete($uid, $cat, $key);
34         }
35 }