IConfigLexicon.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace NCU\Config\Lexicon;
  8. /**
  9. * This interface needs to be implemented if you want to define a config lexicon for your application
  10. * The config lexicon is used to avoid conflicts and problems when storing/retrieving config values
  11. *
  12. * @experimental 31.0.0
  13. */
  14. interface IConfigLexicon {
  15. /**
  16. * Define the expected behavior when using config
  17. * keys not set within your application config lexicon.
  18. *
  19. * @see ConfigLexiconStrictness
  20. * @return ConfigLexiconStrictness
  21. * @experimental 31.0.0
  22. */
  23. public function getStrictness(): ConfigLexiconStrictness;
  24. /**
  25. * define the list of entries of your application config lexicon, related to AppConfig.
  26. *
  27. * @return ConfigLexiconEntry[]
  28. * @experimental 31.0.0
  29. */
  30. public function getAppConfigs(): array;
  31. /**
  32. * define the list of entries of your application config lexicon, related to UserPreferences.
  33. *
  34. * @return ConfigLexiconEntry[]
  35. * @experimental 31.0.0
  36. */
  37. public function getUserConfigs(): array;
  38. }