4
0

SystemConfiguration.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 array{enabled:bool,retention:int} $auto_sqlite_export
  12. * @property-read bool $reauth_required
  13. * @property-read int $reauth_time
  14. * @property-read string $auto_update_url
  15. * @property-read array<int,mixed> $curl_options
  16. * @property string $default_user
  17. * @property string $email_validation_token
  18. * @property bool $force_email_validation
  19. * @property-read bool $http_auth_auto_register
  20. * @property-read string $http_auth_auto_register_email_field
  21. * @property string $language
  22. * @property string $closed_registration_message
  23. * @property array<string,int> $limits
  24. * @property-read string $logo_html
  25. * @property-read string $meta_description
  26. * @property-read int $nb_parallel_refresh
  27. * @property-read bool $pubsubhubbub_enabled
  28. * @property-read string $salt
  29. * @property-read bool $simplepie_syslog_enabled
  30. * @property-read bool $suppress_csp_warning
  31. * @property array<string> $trusted_sources
  32. * @property array<string,array<string,mixed>> $extensions
  33. */
  34. final class FreshRSS_SystemConfiguration extends Minz_Configuration {
  35. /** @throws Minz_FileNotExistException */
  36. public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_SystemConfiguration {
  37. parent::register('system', $config_filename, $default_filename);
  38. try {
  39. return parent::get('system');
  40. } catch (Minz_ConfigurationNamespaceException $ex) {
  41. FreshRSS::killApp($ex->getMessage());
  42. }
  43. }
  44. }