-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49848 from nextcloud/feat/noid/lexicon-configurab…
…le-default-value feat(lexicon): configurable default value
- Loading branch information
Showing
7 changed files
with
157 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OC\Config\Lexicon; | ||
|
||
use NCU\Config\Lexicon\ConfigLexiconEntry; | ||
use NCU\Config\Lexicon\ConfigLexiconStrictness; | ||
use NCU\Config\Lexicon\IConfigLexicon; | ||
use NCU\Config\ValueType; | ||
|
||
/** | ||
* ConfigLexicon for 'core' app/user configs | ||
*/ | ||
class CoreConfigLexicon implements IConfigLexicon { | ||
public function getStrictness(): ConfigLexiconStrictness { | ||
return ConfigLexiconStrictness::IGNORE; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
* @return ConfigLexiconEntry[] | ||
*/ | ||
public function getAppConfigs(): array { | ||
return [ | ||
new ConfigLexiconEntry('lastcron', ValueType::INT, 0, 'timestamp of last cron execution'), | ||
]; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
* @return ConfigLexiconEntry[] | ||
*/ | ||
public function getUserConfigs(): array { | ||
return [ | ||
new ConfigLexiconEntry('lang', ValueType::STRING, null, 'language'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.