Skip to content

Commit b3f52eb

Browse files
committed
feat(appconfig): getValueType() get data from lexicon if available
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent 4783459 commit b3f52eb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/private/AppConfig.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,14 @@ private function getTypedValue(
488488
* @see VALUE_ARRAY
489489
*/
490490
public function getValueType(string $app, string $key, ?bool $lazy = null): int {
491+
$type = self::VALUE_MIXED;
492+
$ignorable = $lazy ?? false;
493+
$this->matchAndApplyLexiconDefinition($app, $key, $ignorable, $type);
494+
if ($type !== self::VALUE_MIXED) {
495+
// a modified $type means config key is set in Lexicon
496+
return $type;
497+
}
498+
491499
$this->assertParams($app, $key);
492500
$this->loadConfig($app, $lazy);
493501

0 commit comments

Comments
 (0)