aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/IConfig.php
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2019-02-22 11:54:20 +0100
committerGitHub <noreply@github.com>2019-02-22 11:54:20 +0100
commit2cc411862912b2e890c0d500b5ba1ce13a6013b6 (patch)
tree01c4eeb066ca058ae83bb2ea218b4c832ecc5f5c /lib/public/IConfig.php
parent7c68e0eae7d378d73aa05361efbba835890c45c2 (diff)
parentb4902369fbbbdddd80ef5043bfb3e9dbd9bf1732 (diff)
downloadnextcloud-server-2cc411862912b2e890c0d500b5ba1ce13a6013b6.tar.gz
nextcloud-server-2cc411862912b2e890c0d500b5ba1ce13a6013b6.zip
Merge pull request #14066 from nextcloud/feature/noid/casted-system-values
Get typed system values
Diffstat (limited to 'lib/public/IConfig.php')
-rw-r--r--lib/public/IConfig.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/public/IConfig.php b/lib/public/IConfig.php
index e4cd158f872..878c0acf0c3 100644
--- a/lib/public/IConfig.php
+++ b/lib/public/IConfig.php
@@ -75,6 +75,36 @@ interface IConfig {
public function getSystemValue($key, $default = '');
/**
+ * Looks up a boolean system wide defined value
+ *
+ * @param string $key the key of the value, under which it was saved
+ * @param bool $default the default value to be returned if the value isn't set
+ * @return bool the value or $default
+ * @since 16.0.0
+ */
+ public function getSystemValueBool(string $key, bool $default = false): bool;
+
+ /**
+ * Looks up an integer system wide defined value
+ *
+ * @param string $key the key of the value, under which it was saved
+ * @param int $default the default value to be returned if the value isn't set
+ * @return int the value or $default
+ * @since 16.0.0
+ */
+ public function getSystemValueInt(string $key, int $default = 0): int;
+
+ /**
+ * Looks up a string system wide defined value
+ *
+ * @param string $key the key of the value, under which it was saved
+ * @param string $default the default value to be returned if the value isn't set
+ * @return string the value or $default
+ * @since 16.0.0
+ */
+ public function getSystemValueString(string $key, string $default = ''): string;
+
+ /**
* Looks up a system wide defined value and filters out sensitive data
*
* @param string $key the key of the value, under which it was saved