]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/PConfig.php
BBCode - fixed syntax error
[friendica.git] / src / Core / PConfig.php
index 2080f716ceb5cfac2b329108cd004535210ecfa3..584318adbc65a4c0efa1368940d1d1961f15e649 100644 (file)
@@ -11,8 +11,6 @@ namespace Friendica\Core;
 use Friendica\App;
 use Friendica\BaseObject;
 
-require_once 'include/dba.php';
-
 /**
  * @brief Management of user configuration storage
  * Note:
@@ -23,7 +21,7 @@ require_once 'include/dba.php';
 class PConfig extends BaseObject
 {
        /**
-        * @var Friendica\Core\Config\IPConfigAdapter
+        * @var \Friendica\Core\Config\IPConfigAdapter
         */
        private static $adapter = null;
 
@@ -39,7 +37,7 @@ class PConfig extends BaseObject
                if ($a->getConfigValue('system', 'config_adapter') == 'preload') {
                        self::$adapter = new Config\PreloadPConfigAdapter($uid);
                } else {
-                       self::$adapter = new Config\JITPConfigAdapter($uid);
+                       self::$adapter = new Config\JITPConfigAdapter();
                }
        }
 
@@ -53,6 +51,7 @@ class PConfig extends BaseObject
         * @param string $family The category of the configuration value
         *
         * @return void
+        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public static function load($uid, $family)
        {
@@ -82,6 +81,7 @@ class PConfig extends BaseObject
         * @param boolean $refresh       optional, If true the config is loaded from the db and not from the cache (default: false)
         *
         * @return mixed Stored value or null if it does not exist
+        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public static function get($uid, $family, $key, $default_value = null, $refresh = false)
        {
@@ -103,14 +103,15 @@ class PConfig extends BaseObject
         * Stores a config value ($value) in the category ($family) under the key ($key)
         * for the user_id $uid.
         *
-        * @note Please do not store booleans - convert to 0/1 integer values!
+        * @note  Please do not store booleans - convert to 0/1 integer values!
         *
         * @param string $uid    The user_id
         * @param string $family The category of the configuration value
         * @param string $key    The configuration key to set
-        * @param string $value  The value to store
+        * @param mixed  $value  The value to store
         *
         * @return bool Operation success
+        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public static function set($uid, $family, $key, $value)
        {
@@ -137,6 +138,7 @@ class PConfig extends BaseObject
         * @param string $key    The configuration key to delete
         *
         * @return mixed
+        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public static function delete($uid, $family, $key)
        {