aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Config/Lexicon
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Config/Lexicon')
-rw-r--r--lib/public/Config/Lexicon/Entry.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/public/Config/Lexicon/Entry.php b/lib/public/Config/Lexicon/Entry.php
index 0e6e664db36..c810522dde5 100644
--- a/lib/public/Config/Lexicon/Entry.php
+++ b/lib/public/Config/Lexicon/Entry.php
@@ -23,16 +23,20 @@ class Entry {
public const RENAME_INVERT_BOOLEAN = 1;
private string $definition = '';
+ private string $note = '';
private ?string $default = null;
/**
- * @param string $key config key, can only contain alphanumerical chars and -._
+ * @param string $key config key; can only contain alphanumerical chars and underscore "_"
* @param ValueType $type type of config value
+ * @param string|int|float|bool|array|Closure|null $defaultRaw default value to be used in case none known
* @param string $definition optional description of config key available when using occ command
* @param bool $lazy set config value as lazy
* @param int $flags set flags
- * @param string|null $rename previous config key to migrate config value from
* @param bool $deprecated set config key as deprecated
+ * @param string|null $rename source in case of a rename of a config key.
+ * @param int $options additional bitflag options {@see self::RENAME_INVERT_BOOLEAN}
+ * @param string $note additional note and warning related to the use of the config key.
*
* @since 32.0.0
* @psalm-suppress PossiblyInvalidCast
@@ -48,6 +52,7 @@ class Entry {
private readonly bool $deprecated = false,
private readonly ?string $rename = null,
private readonly int $options = 0,
+ string $note = '',
) {
// key can only contain alphanumeric chars and underscore "_"
if (preg_match('/[^[:alnum:]_]/', $key)) {
@@ -57,6 +62,7 @@ class Entry {
/** @psalm-suppress UndefinedClass */
if (\OC::$CLI) { // only store definition if ran from CLI
$this->definition = $definition;
+ $this->note = $note;
}
}
@@ -188,6 +194,16 @@ class Entry {
}
/**
+ * returns eventual note
+ *
+ * @return string
+ * @since 32.0.0
+ */
+ public function getNote(): string {
+ return $this->note;
+ }
+
+ /**
* returns if config key is set as lazy
*
* @see IAppConfig for details on lazy config values