4
0

SystemConfiguration.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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-read bool $suppress_csp_warning
  29. * @property array<string> $trusted_sources
  30. * @property array<string,array<string,mixed>> $extensions
  31. */
  32. final class FreshRSS_SystemConfiguration extends Minz_Configuration {
  33. /** @throws Minz_FileNotExistException */
  34. public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_SystemConfiguration {
  35. parent::register('system', $config_filename, $default_filename);
  36. try {
  37. return parent::get('system');
  38. } catch (Minz_ConfigurationNamespaceException $ex) {
  39. FreshRSS::killApp($ex->getMessage());
  40. }
  41. }
  42. }