]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Config/Adapter/IPConfigAdapter.php
Merge branch 'master' into develop
[friendica.git] / src / Core / Config / Adapter / IPConfigAdapter.php
index 3e821efa024a6dc1fdd8c9812ff44f545d639dfe..c505532c5922b7b6cb1809809463c3bb820cb010 100644 (file)
@@ -15,7 +15,7 @@ namespace Friendica\Core\Config\Adapter;
 interface IPConfigAdapter
 {
        /**
-        * Loads all configuration values of a user's config family into a cached storage.
+        * Loads all configuration values of a user's config family and returns the loaded category as an array.
         *
         * @param string $uid The user_id
         * @param string $cat The category of the configuration value
@@ -28,11 +28,13 @@ interface IPConfigAdapter
         * Get a particular user's config variable given the category name
         * ($family) and a key.
         *
+        * Note: Boolean variables are defined as 0/1 in the database
+        *
         * @param string  $uid           The user_id
         * @param string  $cat           The category of the configuration value
         * @param string  $key           The configuration key to query
         *
-        * @return mixed Stored value or "!<unset>!" if it does not exist
+        * @return null|mixed Stored value or null if it does not exist
         */
        public function get($uid, $cat, $key);
 
@@ -59,7 +61,7 @@ interface IPConfigAdapter
         * @param string $cat The category of the configuration value
         * @param string $key The configuration key to delete
         *
-        * @return bool
+        * @return bool Operation success
         */
        public function delete($uid, $cat, $key);
 
@@ -69,4 +71,15 @@ interface IPConfigAdapter
         * @return bool
         */
        public function isConnected();
+
+       /**
+        * Checks, if a config key ($key) in the category ($cat) is already loaded for the user_id $uid.
+        *
+        * @param string $uid The user_id
+        * @param string $cat The configuration category
+        * @param string $key The configuration key
+        *
+        * @return bool
+        */
+       public function isLoaded($uid, $cat, $key);
 }