4
0

SystemConfiguration.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @property bool $allow_anonymous
  5. * @property bool $allow_anonymous_refresh
  6. * @property-read bool $allow_referrer
  7. * @property bool $allow_robots
  8. * @property bool $api_enabled
  9. * @property string $archiving
  10. * @property 'form'|'http_auth'|'none' $auth_type
  11. * @property-read bool $reauth_required
  12. * @property-read int $reauth_time
  13. * @property-read string $auto_update_url
  14. * @property-read array<int,mixed> $curl_options
  15. * @property string $default_user
  16. * @property string $email_validation_token
  17. * @property bool $force_email_validation
  18. * @property-read bool $http_auth_auto_register
  19. * @property-read string $http_auth_auto_register_email_field
  20. * @property string $language
  21. * @property array<string,int> $limits
  22. * @property-read string $logo_html
  23. * @property-read string $meta_description
  24. * @property-read int $nb_parallel_refresh
  25. * @property-read bool $pubsubhubbub_enabled
  26. * @property-read string $salt
  27. * @property-read bool $simplepie_syslog_enabled
  28. * @property bool $unsafe_autologin_enabled
  29. * @property-read bool $suppress_csp_warning
  30. * @property array<string> $trusted_sources
  31. * @property array<string,array<string,mixed>> $extensions
  32. */
  33. final class FreshRSS_SystemConfiguration extends Minz_Configuration {
  34. /** @throws Minz_FileNotExistException */
  35. public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_SystemConfiguration {
  36. parent::register('system', $config_filename, $default_filename);
  37. try {
  38. return parent::get('system');
  39. } catch (Minz_ConfigurationNamespaceException $ex) {
  40. FreshRSS::killApp($ex->getMessage());
  41. }
  42. }
  43. }