aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2025-05-05 10:16:53 -0100
committerMaxence Lange <maxence@artificial-owl.com>2025-05-05 10:17:02 -0100
commitb3f52ebbe866acb69bfd7362eb768bbee552bda6 (patch)
treec79e12403f3cb13841a4c2c9d382aace4aebac96
parent47834591444a64a8f1a041ada241d4b69ca8b7da (diff)
downloadnextcloud-server-feat/noid/get-value-type-from-lexicon.tar.gz
nextcloud-server-feat/noid/get-value-type-from-lexicon.zip
feat(appconfig): getValueType() get data from lexicon if availablefeat/noid/get-value-type-from-lexicon
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--lib/private/AppConfig.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index 092d37c3338..a8a6f689ffa 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -488,6 +488,14 @@ class AppConfig implements IAppConfig {
* @see VALUE_ARRAY
*/
public function getValueType(string $app, string $key, ?bool $lazy = null): int {
+ $type = self::VALUE_MIXED;
+ $ignorable = $lazy ?? false;
+ $this->matchAndApplyLexiconDefinition($app, $key, $ignorable, $type);
+ if ($type !== self::VALUE_MIXED) {
+ // a modified $type means config key is set in Lexicon
+ return $type;
+ }
+
$this->assertParams($app, $key);
$this->loadConfig($app, $lazy);