summaryrefslogtreecommitdiff
path: root/classes/Db_Prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-25 12:55:09 +0300
committerAndrew Dolgov <[email protected]>2023-10-25 12:55:09 +0300
commit865ecc87963dc3b26e66296616eef2a1cc41ac3f (patch)
treebf2ecd8a391103bdb2c8b70cd33c47467310754b /classes/Db_Prefs.php
parent0a5507d3bd79d04c860455664f919bf8e7274fda (diff)
move to psr-4 autoloader
Diffstat (limited to 'classes/Db_Prefs.php')
-rw-r--r--classes/Db_Prefs.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/classes/Db_Prefs.php b/classes/Db_Prefs.php
new file mode 100644
index 000000000..209ef58c1
--- /dev/null
+++ b/classes/Db_Prefs.php
@@ -0,0 +1,18 @@
+<?php
+class Db_Prefs {
+ // this class is a stub for the time being (to be removed)
+
+ /**
+ * @return bool|int|null|string
+ */
+ function read(string $pref_name, ?int $user_id = null, bool $die_on_error = false) {
+ return get_pref($pref_name, $user_id);
+ }
+
+ /**
+ * @param mixed $value
+ */
+ function write(string $pref_name, $value, ?int $user_id = null, bool $strip_tags = true): bool {
+ return set_pref($pref_name, $value, $user_id, $strip_tags);
+ }
+}