diff --git a/lib/SP/Domain/Config/Adapters/ConfigData.php b/lib/SP/Domain/Config/Adapters/ConfigData.php index beba6507..03cd33d5 100644 --- a/lib/SP/Domain/Config/Adapters/ConfigData.php +++ b/lib/SP/Domain/Config/Adapters/ConfigData.php @@ -233,139 +233,139 @@ final class ConfigData extends DataCollection implements JsonSerializable, Confi public function getPublinksMaxTime(): int { - return $this->get('publinksMaxTime', self::DEFAULT_PUBLIC_LINK_MAX_TIME); + return $this->get(ConfigDataInterface::PUBLINKS_MAX_TIME, self::DEFAULT_PUBLIC_LINK_MAX_TIME); } public function setPublinksMaxTime(?int $publinksMaxTime): ConfigDataInterface { - $this->set('publinksMaxTime', (int)$publinksMaxTime); + $this->set(ConfigDataInterface::PUBLINKS_MAX_TIME, (int)$publinksMaxTime); return $this; } public function isSyslogEnabled(): bool { - return $this->get('syslogEnabled', false); + return $this->get(ConfigDataInterface::SYSLOG_ENABLED, false); } public function setSyslogEnabled(?bool $syslogEnabled): ConfigDataInterface { - $this->set('syslogEnabled', (bool)$syslogEnabled); + $this->set(ConfigDataInterface::SYSLOG_ENABLED, (bool)$syslogEnabled); return $this; } public function isSyslogRemoteEnabled(): bool { - return $this->get('syslogRemoteEnabled', false); + return $this->get(ConfigDataInterface::SYSLOG_REMOTE_ENABLED, false); } public function setSyslogRemoteEnabled(?bool $syslogRemoteEnabled): ConfigDataInterface { - $this->set('syslogRemoteEnabled', (bool)$syslogRemoteEnabled); + $this->set(ConfigDataInterface::SYSLOG_REMOTE_ENABLED, (bool)$syslogRemoteEnabled); return $this; } public function getSyslogServer(): ?string { - return $this->get('syslogServer'); + return $this->get(ConfigDataInterface::SYSLOG_SERVER); } public function setSyslogServer(?string $syslogServer): ConfigDataInterface { - $this->set('syslogServer', $syslogServer); + $this->set(ConfigDataInterface::SYSLOG_SERVER, $syslogServer); return $this; } public function getSyslogPort(): int { - return $this->get('syslogPort', self::DEFAULT_SYSLOG_PORT); + return $this->get(ConfigDataInterface::SYSLOG_PORT, self::DEFAULT_SYSLOG_PORT); } public function setSyslogPort(?int $syslogPort): ConfigDataInterface { - $this->set('syslogPort', (int)$syslogPort); + $this->set(ConfigDataInterface::SYSLOG_PORT, (int)$syslogPort); return $this; } public function getBackupHash(): ?string { - return $this->get('backup_hash'); + return $this->get(ConfigDataInterface::BACKUP_HASH); } public function setBackupHash(?string $backup_hash): ConfigDataInterface { - $this->set('backup_hash', $backup_hash); + $this->set(ConfigDataInterface::BACKUP_HASH, $backup_hash); return $this; } public function getExportHash(): ?string { - return $this->get('export_hash'); + return $this->get(ConfigDataInterface::EXPORT_HASH); } public function setExportHash(?string $export_hash): ConfigDataInterface { - $this->set('export_hash', $export_hash); + $this->set(ConfigDataInterface::EXPORT_HASH, $export_hash); return $this; } public function getLdapBindUser(): ?string { - return $this->get('ldapBindUser'); + return $this->get(ConfigDataInterface::LDAP_BIND_USER); } public function setLdapBindUser(?string $ldapBindUser): ConfigDataInterface { - $this->set('ldapBindUser', $ldapBindUser); + $this->set(ConfigDataInterface::LDAP_BIND_USER, $ldapBindUser); return $this; } public function getAccountCount(): int { - return $this->get('accountCount', self::DEFAULT_ACCOUNT_COUNT); + return $this->get(ConfigDataInterface::ACCOUNT_COUNT, self::DEFAULT_ACCOUNT_COUNT); } public function setAccountCount(?int $accountCount): ConfigDataInterface { - $this->set('accountCount', (int)$accountCount); + $this->set(ConfigDataInterface::ACCOUNT_COUNT, (int)$accountCount); return $this; } public function isAccountLink(): bool { - return $this->get('accountLink', true); + return $this->get(ConfigDataInterface::ACCOUNT_LINK, true); } public function setAccountLink(?bool $accountLink): ConfigDataInterface { - $this->set('accountLink', (bool)$accountLink); + $this->set(ConfigDataInterface::ACCOUNT_LINK, (bool)$accountLink); return $this; } public function isCheckUpdates(): bool { - return $this->get('checkUpdates', false); + return $this->get(ConfigDataInterface::CHECK_UPDATES, false); } public function setCheckUpdates(?bool $checkUpdates): ConfigDataInterface { - $this->set('checkUpdates', (bool)$checkUpdates); + $this->set(ConfigDataInterface::CHECK_UPDATES, (bool)$checkUpdates); return $this; } public function getConfigHash(): ?string { - return $this->get('configHash'); + return $this->get(ConfigDataInterface::CONFIG_HASH); } /** @@ -373,528 +373,528 @@ final class ConfigData extends DataCollection implements JsonSerializable, Confi */ public function setConfigHash(): ConfigDataInterface { - $this->set('configHash', sha1(serialize($this->attributes))); + $this->set(ConfigDataInterface::CONFIG_HASH, sha1(serialize($this->attributes))); return $this; } public function getDbHost(): ?string { - return $this->get('dbHost'); + return $this->get(ConfigDataInterface::DB_HOST); } public function setDbHost(?string $dbHost): ConfigDataInterface { - $this->set('dbHost', $dbHost); + $this->set(ConfigDataInterface::DB_HOST, $dbHost); return $this; } public function getDbName(): ?string { - return $this->get('dbName'); + return $this->get(ConfigDataInterface::DB_NAME); } public function setDbName(?string $dbName): ConfigDataInterface { - $this->set('dbName', $dbName); + $this->set(ConfigDataInterface::DB_NAME, $dbName); return $this; } public function getDbPass(): ?string { - return $this->get('dbPass'); + return $this->get(ConfigDataInterface::DB_PASS); } public function setDbPass(?string $dbPass): ConfigDataInterface { - $this->set('dbPass', $dbPass); + $this->set(ConfigDataInterface::DB_PASS, $dbPass); return $this; } public function getDbUser(): ?string { - return $this->get('dbUser'); + return $this->get(ConfigDataInterface::DB_USER); } public function setDbUser(?string $dbUser): ConfigDataInterface { - $this->set('dbUser', $dbUser); + $this->set(ConfigDataInterface::DB_USER, $dbUser); return $this; } public function isDebug(): bool { - return $this->get('debug', false); + return $this->get(ConfigDataInterface::DEBUG, false); } public function setDebug(?bool $debug): ConfigDataInterface { - $this->set('debug', (bool)$debug); + $this->set(ConfigDataInterface::DEBUG, (bool)$debug); return $this; } public function isDemoEnabled(): bool { - return $this->get('demoEnabled', false); + return $this->get(ConfigDataInterface::DEMO_ENABLED, false); } public function setDemoEnabled(?bool $demoEnabled): ConfigDataInterface { - $this->set('demoEnabled', (bool)$demoEnabled); + $this->set(ConfigDataInterface::DEMO_ENABLED, (bool)$demoEnabled); return $this; } public function getFilesAllowedExts(): array { - return $this->get('filesAllowedExts', []); + return $this->get(ConfigDataInterface::FILES_ALLOWED_EXTS, []); } public function getFilesAllowedSize(): int { - return $this->get('filesAllowedSize', self::DEFAULT_FILES_ALLOWED_SIZE); + return $this->get(ConfigDataInterface::FILES_ALLOWED_SIZE, self::DEFAULT_FILES_ALLOWED_SIZE); } public function setFilesAllowedSize(?int $filesAllowedSize): ConfigDataInterface { - $this->set('filesAllowedSize', (int)$filesAllowedSize); + $this->set(ConfigDataInterface::FILES_ALLOWED_SIZE, (int)$filesAllowedSize); return $this; } public function isFilesEnabled(): bool { - return $this->get('filesEnabled', true); + return $this->get(ConfigDataInterface::FILES_ENABLED, true); } public function setFilesEnabled(?bool $filesEnabled): ConfigDataInterface { - $this->set('filesEnabled', (bool)$filesEnabled); + $this->set(ConfigDataInterface::FILES_ENABLED, (bool)$filesEnabled); return $this; } public function isGlobalSearch(): bool { - return $this->get('globalSearch', true); + return $this->get(ConfigDataInterface::GLOBAL_SEARCH, true); } public function setGlobalSearch(?bool $globalSearch): ConfigDataInterface { - $this->set('globalSearch', (bool)$globalSearch); + $this->set(ConfigDataInterface::GLOBAL_SEARCH, (bool)$globalSearch); return $this; } public function isInstalled(): bool { - return $this->get('installed', false); + return $this->get(ConfigDataInterface::INSTALLED, false); } public function setInstalled(?bool $installed): ConfigDataInterface { - $this->set('installed', (bool)$installed); + $this->set(ConfigDataInterface::INSTALLED, (bool)$installed); return $this; } public function getLdapBase(): ?string { - return $this->get('ldapBase'); + return $this->get(ConfigDataInterface::LDAP_BASE); } public function setLdapBase(?string $ldapBase): ConfigDataInterface { - $this->set('ldapBase', $ldapBase); + $this->set(ConfigDataInterface::LDAP_BASE, $ldapBase); return $this; } public function isLdapEnabled(): bool { - return $this->get('ldapEnabled', false); + return $this->get(ConfigDataInterface::LDAP_ENABLED, false); } public function setLdapEnabled(?bool $ldapEnabled): ConfigDataInterface { - $this->set('ldapEnabled', (bool)$ldapEnabled); + $this->set(ConfigDataInterface::LDAP_ENABLED, (bool)$ldapEnabled); return $this; } public function getLdapGroup(): ?string { - return $this->get('ldapGroup'); + return $this->get(ConfigDataInterface::LDAP_GROUP); } public function setLdapGroup(?string $ldapGroup): ConfigDataInterface { - $this->set('ldapGroup', $ldapGroup); + $this->set(ConfigDataInterface::LDAP_GROUP, $ldapGroup); return $this; } public function getLdapServer(): ?string { - return $this->get('ldapServer'); + return $this->get(ConfigDataInterface::LDAP_SERVER); } public function setLdapServer(?string $ldapServer): ConfigDataInterface { - $this->set('ldapServer', $ldapServer); + $this->set(ConfigDataInterface::LDAP_SERVER, $ldapServer); return $this; } public function isLogEnabled(): bool { - return $this->get('logEnabled', true); + return $this->get(ConfigDataInterface::LOG_ENABLED, true); } public function setLogEnabled(?bool $logEnabled): ConfigDataInterface { - $this->set('logEnabled', (bool)$logEnabled); + $this->set(ConfigDataInterface::LOG_ENABLED, (bool)$logEnabled); return $this; } public function isMailAuthenabled(): bool { - return $this->get('mailAuthenabled', false); + return $this->get(ConfigDataInterface::MAIL_AUTHENABLED, false); } public function setMailAuthenabled(?bool $mailAuthenabled): ConfigDataInterface { - $this->set('mailAuthenabled', (bool)$mailAuthenabled); + $this->set(ConfigDataInterface::MAIL_AUTHENABLED, (bool)$mailAuthenabled); return $this; } public function isMailEnabled(): bool { - return $this->get('mailEnabled', false); + return $this->get(ConfigDataInterface::MAIL_ENABLED, false); } public function setMailEnabled(?bool $mailEnabled): ConfigDataInterface { - $this->set('mailEnabled', (bool)$mailEnabled); + $this->set(ConfigDataInterface::MAIL_ENABLED, (bool)$mailEnabled); return $this; } public function getMailFrom(): ?string { - return $this->get('mailFrom'); + return $this->get(ConfigDataInterface::MAIL_FROM); } public function setMailFrom(?string $mailFrom): ConfigDataInterface { - $this->set('mailFrom', $mailFrom); + $this->set(ConfigDataInterface::MAIL_FROM, $mailFrom); return $this; } public function getMailPass(): ?string { - return $this->get('mailPass'); + return $this->get(ConfigDataInterface::MAIL_PASS); } public function setMailPass(?string $mailPass): ConfigDataInterface { - $this->set('mailPass', $mailPass); + $this->set(ConfigDataInterface::MAIL_PASS, $mailPass); return $this; } public function getMailPort(): int { - return $this->get('mailPort', self::DEFAULT_MAIL_PORT); + return $this->get(ConfigDataInterface::MAIL_PORT, self::DEFAULT_MAIL_PORT); } public function setMailPort(?int $mailPort): ConfigDataInterface { - $this->set('mailPort', (int)$mailPort); + $this->set(ConfigDataInterface::MAIL_PORT, (int)$mailPort); return $this; } public function isMailRequestsEnabled(): bool { - return $this->get('mailRequestsEnabled', false); + return $this->get(ConfigDataInterface::MAIL_REQUESTS_ENABLED, false); } public function setMailRequestsEnabled(?bool $mailRequestsEnabled): ConfigDataInterface { - $this->set('mailRequestsEnabled', (bool)$mailRequestsEnabled); + $this->set(ConfigDataInterface::MAIL_REQUESTS_ENABLED, (bool)$mailRequestsEnabled); return $this; } public function getMailSecurity(): ?string { - return $this->get('mailSecurity'); + return $this->get(ConfigDataInterface::MAIL_SECURITY); } public function setMailSecurity(?string $mailSecurity): ConfigDataInterface { - $this->set('mailSecurity', $mailSecurity); + $this->set(ConfigDataInterface::MAIL_SECURITY, $mailSecurity); return $this; } public function getMailServer(): ?string { - return $this->get('mailServer'); + return $this->get(ConfigDataInterface::MAIL_SERVER); } public function setMailServer(?string $mailServer): ConfigDataInterface { - $this->set('mailServer', $mailServer); + $this->set(ConfigDataInterface::MAIL_SERVER, $mailServer); return $this; } public function getMailUser(): ?string { - return $this->get('mailUser'); + return $this->get(ConfigDataInterface::MAIL_USER); } public function setMailUser(?string $mailUser): ConfigDataInterface { - $this->set('mailUser', $mailUser); + $this->set(ConfigDataInterface::MAIL_USER, $mailUser); return $this; } public function isMaintenance(): bool { - return $this->get('maintenance', false); + return $this->get(ConfigDataInterface::MAINTENANCE, false); } public function setMaintenance(?bool $maintenance): ConfigDataInterface { - $this->set('maintenance', (bool)$maintenance); + $this->set(ConfigDataInterface::MAINTENANCE, (bool)$maintenance); return $this; } public function getPasswordSalt(): ?string { - return $this->get('passwordSalt'); + return $this->get(ConfigDataInterface::PASSWORD_SALT); } public function setPasswordSalt(?string $passwordSalt): ConfigDataInterface { - $this->set('passwordSalt', $passwordSalt); + $this->set(ConfigDataInterface::PASSWORD_SALT, $passwordSalt); return $this; } public function isResultsAsCards(): bool { - return $this->get('resultsAsCards', false); + return $this->get(ConfigDataInterface::RESULTS_AS_CARDS, false); } public function setResultsAsCards(?bool $resultsAsCards): ConfigDataInterface { - $this->set('resultsAsCards', (bool)$resultsAsCards); + $this->set(ConfigDataInterface::RESULTS_AS_CARDS, (bool)$resultsAsCards); return $this; } public function getSessionTimeout(): int { - return $this->get('sessionTimeout', self::DEFAULT_SESSION_TIMEOUT); + return $this->get(ConfigDataInterface::SESSION_TIMEOUT, self::DEFAULT_SESSION_TIMEOUT); } public function setSessionTimeout(?int $sessionTimeout): ConfigDataInterface { - $this->set('sessionTimeout', (int)$sessionTimeout); + $this->set(ConfigDataInterface::SESSION_TIMEOUT, (int)$sessionTimeout); return $this; } public function getSiteLang(): ?string { - return $this->get('siteLang'); + return $this->get(ConfigDataInterface::SITE_LANG); } public function setSiteLang(?string $siteLang): ConfigDataInterface { - $this->set('siteLang', $siteLang); + $this->set(ConfigDataInterface::SITE_LANG, $siteLang); return $this; } public function getSiteTheme(): string { - return $this->get('siteTheme', self::DEFAULT_SITE_THEME); + return $this->get(ConfigDataInterface::SITE_THEME, self::DEFAULT_SITE_THEME); } public function setSiteTheme(?string $siteTheme): ConfigDataInterface { - $this->set('siteTheme', $siteTheme); + $this->set(ConfigDataInterface::SITE_THEME, $siteTheme); return $this; } public function getConfigVersion(): ?string { - return (string)$this->get('configVersion'); + return (string)$this->get(ConfigDataInterface::CONFIG_VERSION); } public function setConfigVersion(?string $configVersion): ConfigDataInterface { - $this->set('configVersion', $configVersion); + $this->set(ConfigDataInterface::CONFIG_VERSION, $configVersion); return $this; } public function isWikiEnabled(): bool { - return $this->get('wikiEnabled', false); + return $this->get(ConfigDataInterface::WIKI_ENABLED, false); } public function setWikiEnabled(?bool $wikiEnabled): ConfigDataInterface { - $this->set('wikiEnabled', (bool)$wikiEnabled); + $this->set(ConfigDataInterface::WIKI_ENABLED, (bool)$wikiEnabled); return $this; } public function getWikiFilter(): array { - return $this->get('wikiFilter', []); + return $this->get(ConfigDataInterface::WIKI_FILTER, []); } public function setWikiFilter(?array $wikiFilter): ConfigDataInterface { - $this->set('wikiFilter', $wikiFilter); + $this->set(ConfigDataInterface::WIKI_FILTER, $wikiFilter); return $this; } public function getWikiPageurl(): ?string { - return $this->get('wikiPageurl'); + return $this->get(ConfigDataInterface::WIKI_PAGEURL); } public function setWikiPageurl(?string $wikiPageurl): ConfigDataInterface { - $this->set('wikiPageurl', $wikiPageurl); + $this->set(ConfigDataInterface::WIKI_PAGEURL, $wikiPageurl); return $this; } public function getWikiSearchurl(): ?string { - return $this->get('wikiSearchurl'); + return $this->get(ConfigDataInterface::WIKI_SEARCHURL); } public function setWikiSearchurl(?string $wikiSearchurl): ConfigDataInterface { - $this->set('wikiSearchurl', $wikiSearchurl); + $this->set(ConfigDataInterface::WIKI_SEARCHURL, $wikiSearchurl); return $this; } public function getLdapBindPass(): ?string { - return $this->get('ldapBindPass'); + return $this->get(ConfigDataInterface::LDAP_BIND_PASS); } public function setLdapBindPass(?string $ldapBindPass): ConfigDataInterface { - $this->set('ldapBindPass', $ldapBindPass); + $this->set(ConfigDataInterface::LDAP_BIND_PASS, $ldapBindPass); return $this; } public function isPublinksImageEnabled(): bool { - return $this->get('publinksImageEnabled', false); + return $this->get(ConfigDataInterface::PUBLINKS_IMAGE_ENABLED, false); } public function setPublinksImageEnabled(?bool $publinksImageEnabled): ConfigDataInterface { - $this->set('publinksImageEnabled', (bool)$publinksImageEnabled); + $this->set(ConfigDataInterface::PUBLINKS_IMAGE_ENABLED, (bool)$publinksImageEnabled); return $this; } public function isHttpsEnabled(): bool { - return $this->get('httpsEnabled', false); + return $this->get(ConfigDataInterface::HTTPS_ENABLED, false); } public function setHttpsEnabled(?bool $httpsEnabled): ConfigDataInterface { - $this->set('httpsEnabled', (bool)$httpsEnabled); + $this->set(ConfigDataInterface::HTTPS_ENABLED, (bool)$httpsEnabled); return $this; } public function isCheckNotices(): bool { - return $this->get('checkNotices', false); + return $this->get(ConfigDataInterface::CHECK_NOTICES, false); } public function setCheckNotices(?bool $checknotices): ConfigDataInterface { - $this->set('checkNotices', (bool)$checknotices); + $this->set(ConfigDataInterface::CHECK_NOTICES, (bool)$checknotices); return $this; } public function isAccountPassToImage(): bool { - return $this->get('accountPassToImage', false); + return $this->get(ConfigDataInterface::ACCOUNT_PASS_TO_IMAGE, false); } public function setAccountPassToImage(?bool $accountPassToImage): ConfigDataInterface { - $this->set('accountPassToImage', (bool)$accountPassToImage); + $this->set(ConfigDataInterface::ACCOUNT_PASS_TO_IMAGE, (bool)$accountPassToImage); return $this; } public function getUpgradeKey(): ?string { - return $this->get('upgradeKey'); + return $this->get(ConfigDataInterface::UPGRADE_KEY); } public function setUpgradeKey(?string $upgradeKey): ConfigDataInterface { - $this->set('upgradeKey', $upgradeKey); + $this->set(ConfigDataInterface::UPGRADE_KEY, $upgradeKey); return $this; } public function getDbPort(): int { - return $this->get('dbPort', self::DEFAULT_DB_PORT); + return $this->get(ConfigDataInterface::DB_PORT, self::DEFAULT_DB_PORT); } public function setDbPort(?int $dbPort): ConfigDataInterface { - $this->set('dbPort', (int)$dbPort); + $this->set(ConfigDataInterface::DB_PORT, (int)$dbPort); return $this; } public function isPublinksEnabled(): bool { - return $this->get('publinksEnabled', false); + return $this->get(ConfigDataInterface::PUBLINKS_ENABLED, false); } public function setPublinksEnabled(?bool $publinksEnabled): ConfigDataInterface { - $this->set('publinksEnabled', (bool)$publinksEnabled); + $this->set(ConfigDataInterface::PUBLINKS_ENABLED, (bool)$publinksEnabled); return $this; } @@ -914,72 +914,72 @@ final class ConfigData extends DataCollection implements JsonSerializable, Confi public function getConfigSaver(): ?string { - return $this->get('configSaver'); + return $this->get(ConfigDataInterface::CONFIG_SAVER); } public function setConfigSaver(?string $configSaver): ConfigDataInterface { - $this->set('configSaver', $configSaver); + $this->set(ConfigDataInterface::CONFIG_SAVER, $configSaver); return $this; } public function getDbSocket(): ?string { - return $this->get('dbSocket'); + return $this->get(ConfigDataInterface::DB_SOCKET); } public function setDbSocket(?string $dbSocket): ConfigDataInterface { - $this->set('dbSocket', $dbSocket); + $this->set(ConfigDataInterface::DB_SOCKET, $dbSocket); return $this; } public function isEncryptSession(): bool { - return (bool)$this->get('encryptSession', false); + return (bool)$this->get(ConfigDataInterface::ENCRYPT_SESSION, false); } public function setEncryptSession(?bool $encryptSession): ConfigDataInterface { - $this->set('encryptSession', (bool)$encryptSession); + $this->set(ConfigDataInterface::ENCRYPT_SESSION, (bool)$encryptSession); return $this; } public function isAccountFullGroupAccess(): bool { - return (bool)$this->get('accountFullGroupAccess', false); + return (bool)$this->get(ConfigDataInterface::ACCOUNT_FULL_GROUP_ACCESS, false); } public function setAccountFullGroupAccess(?bool $accountFullGroupAccess): ConfigDataInterface { - $this->set('accountFullGroupAccess', (bool)$accountFullGroupAccess); + $this->set(ConfigDataInterface::ACCOUNT_FULL_GROUP_ACCESS, (bool)$accountFullGroupAccess); return $this; } public function isAuthBasicEnabled(): bool { - return (bool)$this->get('authBasicEnabled', true); + return (bool)$this->get(ConfigDataInterface::AUTH_BASIC_ENABLED, true); } public function setAuthBasicEnabled(?bool $authBasicEnabled): ConfigDataInterface { - $this->set('authBasicEnabled', (bool)$authBasicEnabled); + $this->set(ConfigDataInterface::AUTH_BASIC_ENABLED, (bool)$authBasicEnabled); return $this; } public function getAuthBasicDomain(): ?string { - return $this->get('authBasicDomain'); + return $this->get(ConfigDataInterface::AUTH_BASIC_DOMAIN); } public function setAuthBasicDomain(?string $authBasicDomain): ConfigDataInterface { - $this->set('authBasicDomain', $authBasicDomain); + $this->set(ConfigDataInterface::AUTH_BASIC_DOMAIN, $authBasicDomain); return $this; } @@ -989,60 +989,60 @@ final class ConfigData extends DataCollection implements JsonSerializable, Confi */ public function isAuthBasicAutoLoginEnabled(): bool { - return (bool)$this->get('authBasicAutoLoginEnabled', true); + return (bool)$this->get(ConfigDataInterface::AUTH_BASIC_AUTO_LOGIN_ENABLED, true); } public function setAuthBasicAutoLoginEnabled(?bool $authBasicAutoLoginEnabled): ConfigDataInterface { - $this->set('authBasicAutoLoginEnabled', $authBasicAutoLoginEnabled); + $this->set(ConfigDataInterface::AUTH_BASIC_AUTO_LOGIN_ENABLED, $authBasicAutoLoginEnabled); return $this; } public function getSsoDefaultGroup(): ?int { - return $this->get('ssoDefaultGroup'); + return $this->get(ConfigDataInterface::SSO_DEFAULT_GROUP); } public function setSsoDefaultGroup(?int $ssoDefaultGroup): ConfigDataInterface { - $this->set('ssoDefaultGroup', $ssoDefaultGroup); + $this->set(ConfigDataInterface::SSO_DEFAULT_GROUP, $ssoDefaultGroup); return $this; } public function getSsoDefaultProfile(): ?int { - return $this->get('ssoDefaultProfile'); + return $this->get(ConfigDataInterface::SSO_DEFAULT_PROFILE); } public function setSsoDefaultProfile(?int $ssoDefaultProfile): ConfigDataInterface { - $this->set('ssoDefaultProfile', $ssoDefaultProfile); + $this->set(ConfigDataInterface::SSO_DEFAULT_PROFILE, $ssoDefaultProfile); return $this; } public function getMailRecipients(): array { - return $this->get('mailRecipients', []); + return $this->get(ConfigDataInterface::MAIL_RECIPIENTS, []); } public function setMailRecipients(?array $mailRecipients): ConfigDataInterface { - $this->set('mailRecipients', $mailRecipients); + $this->set(ConfigDataInterface::MAIL_RECIPIENTS, $mailRecipients); return $this; } public function getMailEvents(): array { - return $this->get('mailEvents', []); + return $this->get(ConfigDataInterface::MAIL_EVENTS, []); } public function setMailEvents(?array $mailEvents): ConfigDataInterface { - $this->set('mailEvents', $mailEvents); + $this->set(ConfigDataInterface::MAIL_EVENTS, $mailEvents); return $this; } @@ -1052,109 +1052,109 @@ final class ConfigData extends DataCollection implements JsonSerializable, Confi */ public function getDatabaseVersion(): string { - return (string)$this->get('databaseVersion'); + return (string)$this->get(ConfigDataInterface::DATABASE_VERSION); } public function setDatabaseVersion(?string $databaseVersion): ConfigDataInterface { - $this->set('databaseVersion', $databaseVersion); + $this->set(ConfigDataInterface::DATABASE_VERSION, $databaseVersion); return $this; } public function getConfigDate(): int { - return (int)$this->get('configDate'); + return (int)$this->get(ConfigDataInterface::CONFIG_DATE); } public function setConfigDate(int $configDate): ConfigDataInterface { - $this->set('configDate', $configDate); + $this->set(ConfigDataInterface::CONFIG_DATE, $configDate); return $this; } public function isAccountExpireEnabled(): bool { - return (bool)$this->get('accountExpireEnabled', false); + return (bool)$this->get(ConfigDataInterface::ACCOUNT_EXPIRE_ENABLED, false); } public function setAccountExpireEnabled(?bool $accountExpireEnabled): ConfigDataInterface { - $this->set('accountExpireEnabled', (bool)$accountExpireEnabled); + $this->set(ConfigDataInterface::ACCOUNT_EXPIRE_ENABLED, (bool)$accountExpireEnabled); return $this; } public function getAccountExpireTime(): int { - return $this->get('accountExpireTime', self::DEFAULT_ACCOUNT_EXPIRE_TIME); + return $this->get(ConfigDataInterface::ACCOUNT_EXPIRE_TIME, self::DEFAULT_ACCOUNT_EXPIRE_TIME); } public function setAccountExpireTime(?int $accountExpireTime): ConfigDataInterface { - $this->set('accountExpireTime', (int)$accountExpireTime); + $this->set(ConfigDataInterface::ACCOUNT_EXPIRE_TIME, (int)$accountExpireTime); return $this; } public function isLdapTlsEnabled(): bool { - return $this->get('ldapTlsEnabled', false); + return $this->get(ConfigDataInterface::LDAP_TLS_ENABLED, false); } public function setLdapTlsEnabled(?bool $ldapTlsEnabled): ConfigDataInterface { - $this->set('ldapTlsEnabled', (int)$ldapTlsEnabled); + $this->set(ConfigDataInterface::LDAP_TLS_ENABLED, (int)$ldapTlsEnabled); return $this; } public function getFilesAllowedMime(): array { - return $this->get('filesAllowedMime', []); + return $this->get(ConfigDataInterface::FILES_ALLOWED_MIME, []); } public function setFilesAllowedMime(?array $filesAllowedMime): ConfigDataInterface { - $this->set('filesAllowedMime', $filesAllowedMime); + $this->set(ConfigDataInterface::FILES_ALLOWED_MIME, $filesAllowedMime); return $this; } public function getLdapType(): int { - return (int)$this->get('ldapType'); + return (int)$this->get(ConfigDataInterface::LDAP_TYPE); } public function setLdapType(?int $ldapType): ConfigDataInterface { - $this->set('ldapType', (int)$ldapType); + $this->set(ConfigDataInterface::LDAP_TYPE, (int)$ldapType); return $this; } public function getAppVersion(): string { - return $this->get('appVersion'); + return $this->get(ConfigDataInterface::APP_VERSION); } public function setAppVersion(?string $appVersion): ConfigDataInterface { - $this->set('appVersion', $appVersion); + $this->set(ConfigDataInterface::APP_VERSION, $appVersion); return $this; } public function getApplicationUrl(): ?string { - return $this->get('applicationUrl'); + return $this->get(ConfigDataInterface::APPLICATION_URL); } public function setApplicationUrl(?string $applicationUrl): ConfigDataInterface { $this->set( - 'applicationUrl', + ConfigDataInterface::APPLICATION_URL, $applicationUrl ? rtrim($applicationUrl, '/') : null @@ -1165,60 +1165,60 @@ final class ConfigData extends DataCollection implements JsonSerializable, Confi public function getLdapFilterUserObject(): ?string { - return $this->get('ldapFilterUserObject'); + return $this->get(ConfigDataInterface::LDAP_FILTER_USER_OBJECT); } public function setLdapFilterUserObject(?string $filter): ConfigDataInterface { - $this->set('ldapFilterUserObject', $filter); + $this->set(ConfigDataInterface::LDAP_FILTER_USER_OBJECT, $filter); return $this; } public function getLdapFilterGroupObject(): ?string { - return $this->get('ldapFilterGroupObject'); + return $this->get(ConfigDataInterface::LDAP_FILTER_GROUP_OBJECT); } public function setLdapFilterGroupObject(?string $filter): ConfigDataInterface { - $this->set('ldapFilterGroupObject', $filter); + $this->set(ConfigDataInterface::LDAP_FILTER_GROUP_OBJECT, $filter); return $this; } public function getLdapFilterUserAttributes(): array { - return $this->get('ldapFilterUserAttributes', []); + return $this->get(ConfigDataInterface::LDAP_FILTER_USER_ATTRIBUTES, []); } public function setLdapFilterUserAttributes(?array $attributes): ConfigDataInterface { - $this->set('ldapFilterUserAttributes', $attributes); + $this->set(ConfigDataInterface::LDAP_FILTER_USER_ATTRIBUTES, $attributes); return $this; } public function getLdapFilterGroupAttributes(): array { - return $this->get('ldapFilterGroupAttributes', []); + return $this->get(ConfigDataInterface::LDAP_FILTER_GROUP_ATTRIBUTES, []); } public function setLdapFilterGroupAttributes(?array $attributes): ConfigDataInterface { - $this->set('ldapFilterGroupAttributes', $attributes); + $this->set(ConfigDataInterface::LDAP_FILTER_GROUP_ATTRIBUTES, $attributes); return $this; } public function isLdapDatabaseEnabled(): bool { - return $this->get('ldapDatabaseEnabled', true); + return $this->get(ConfigDataInterface::LDAP_DATABASE_ENABLED, true); } public function setLdapDatabaseEnabled(?bool $ldapDatabaseEnabled): ConfigDataInterface { - $this->set('ldapDatabaseEnabled', (int)$ldapDatabaseEnabled); + $this->set(ConfigDataInterface::LDAP_DATABASE_ENABLED, (int)$ldapDatabaseEnabled); return $this; } diff --git a/lib/SP/Domain/Config/In/ConfigDataInterface.php b/lib/SP/Domain/Config/In/ConfigDataInterface.php index 07b031e4..5891b1b7 100644 --- a/lib/SP/Domain/Config/In/ConfigDataInterface.php +++ b/lib/SP/Domain/Config/In/ConfigDataInterface.php @@ -30,21 +30,102 @@ namespace SP\Domain\Config\In; */ interface ConfigDataInterface { - public const LOG_EVENTS = 'logEvents'; - public const DOKUWIKI_ENABLED = 'dokuwikiEnabled'; - public const DOKUWIKI_URL = 'dokuwikiUrl'; - public const DOKUWIKI_URL_BASE = 'dokuwikiUrlBase'; - public const DOKUWIKI_USER = 'dokuwikiUser'; - public const DOKUWIKI_PASS = 'dokuwikiPass'; - public const DOKUWIKI_NAMESPACE = 'dokuwikiNamespace'; - public const LDAP_DEFAULT_GROUP = 'ldapDefaultGroup'; - public const LDAP_DEFAULT_PROFILE = 'ldapDefaultProfile'; - public const PROXY_ENABLED = 'proxyEnabled'; - public const PROXY_SERVER = 'proxyServer'; - public const PROXY_PORT = 'proxyPort'; - public const PROXY_USER = 'proxyUser'; - public const PROXY_PASS = 'proxyPass'; - public const PUBLINKS_MAX_VIEWS = 'publinksMaxViews'; + public const LOG_EVENTS = 'logEvents'; + public const DOKUWIKI_ENABLED = 'dokuwikiEnabled'; + public const DOKUWIKI_URL = 'dokuwikiUrl'; + public const DOKUWIKI_URL_BASE = 'dokuwikiUrlBase'; + public const DOKUWIKI_USER = 'dokuwikiUser'; + public const DOKUWIKI_PASS = 'dokuwikiPass'; + public const DOKUWIKI_NAMESPACE = 'dokuwikiNamespace'; + public const LDAP_DEFAULT_GROUP = 'ldapDefaultGroup'; + public const LDAP_DEFAULT_PROFILE = 'ldapDefaultProfile'; + public const PROXY_ENABLED = 'proxyEnabled'; + public const PROXY_SERVER = 'proxyServer'; + public const PROXY_PORT = 'proxyPort'; + public const PROXY_USER = 'proxyUser'; + public const PROXY_PASS = 'proxyPass'; + public const PUBLINKS_MAX_VIEWS = 'publinksMaxViews'; + public const PUBLINKS_MAX_TIME = 'publinksMaxTime'; + public const SYSLOG_ENABLED = 'syslogEnabled'; + public const SYSLOG_REMOTE_ENABLED = 'syslogRemoteEnabled'; + public const SYSLOG_SERVER = 'syslogServer'; + public const SYSLOG_PORT = 'syslogPort'; + public const BACKUP_HASH = 'backup_hash'; + public const EXPORT_HASH = 'export_hash'; + public const LDAP_BIND_USER = 'ldapBindUser'; + public const ACCOUNT_COUNT = 'accountCount'; + public const ACCOUNT_LINK = 'accountLink'; + public const CHECK_UPDATES = 'checkUpdates'; + public const CONFIG_HASH = 'configHash'; + public const DB_HOST = 'dbHost'; + public const DB_NAME = 'dbName'; + public const DB_PASS = 'dbPass'; + public const DB_USER = 'dbUser'; + public const DEBUG = 'debug'; + public const DEMO_ENABLED = 'demoEnabled'; + public const FILES_ALLOWED_EXTS = 'filesAllowedExts'; + public const FILES_ALLOWED_SIZE = 'filesAllowedSize'; + public const FILES_ENABLED = 'filesEnabled'; + public const GLOBAL_SEARCH = 'globalSearch'; + public const INSTALLED = 'installed'; + public const LDAP_BASE = 'ldapBase'; + public const LDAP_ENABLED = 'ldapEnabled'; + public const LDAP_GROUP = 'ldapGroup'; + public const LDAP_SERVER = 'ldapServer'; + public const LOG_ENABLED = 'logEnabled'; + public const MAIL_AUTHENABLED = 'mailAuthenabled'; + public const MAIL_ENABLED = 'mailEnabled'; + public const MAIL_FROM = 'mailFrom'; + public const MAIL_PASS = 'mailPass'; + public const MAIL_PORT = 'mailPort'; + public const MAIL_REQUESTS_ENABLED = 'mailRequestsEnabled'; + public const MAIL_SECURITY = 'mailSecurity'; + public const MAIL_SERVER = 'mailServer'; + public const MAIL_USER = 'mailUser'; + public const MAINTENANCE = 'maintenance'; + public const PASSWORD_SALT = 'passwordSalt'; + public const RESULTS_AS_CARDS = 'resultsAsCards'; + public const SESSION_TIMEOUT = 'sessionTimeout'; + public const SITE_LANG = 'siteLang'; + public const SITE_THEME = 'siteTheme'; + public const CONFIG_VERSION = 'configVersion'; + public const WIKI_ENABLED = 'wikiEnabled'; + public const WIKI_FILTER = 'wikiFilter'; + public const WIKI_PAGEURL = 'wikiPageurl'; + public const WIKI_SEARCHURL = 'wikiSearchurl'; + public const LDAP_BIND_PASS = 'ldapBindPass'; + public const PUBLINKS_IMAGE_ENABLED = 'publinksImageEnabled'; + public const HTTPS_ENABLED = 'httpsEnabled'; + public const CHECK_NOTICES = 'checkNotices'; + public const ACCOUNT_PASS_TO_IMAGE = 'accountPassToImage'; + public const UPGRADE_KEY = 'upgradeKey'; + public const DB_PORT = 'dbPort'; + public const PUBLINKS_ENABLED = 'publinksEnabled'; + public const CONFIG_SAVER = 'configSaver'; + public const DB_SOCKET = 'dbSocket'; + public const ENCRYPT_SESSION = 'encryptSession'; + public const ACCOUNT_FULL_GROUP_ACCESS = 'accountFullGroupAccess'; + public const AUTH_BASIC_ENABLED = 'authBasicEnabled'; + public const AUTH_BASIC_DOMAIN = 'authBasicDomain'; + public const AUTH_BASIC_AUTO_LOGIN_ENABLED = 'authBasicAutoLoginEnabled'; + public const SSO_DEFAULT_GROUP = 'ssoDefaultGroup'; + public const SSO_DEFAULT_PROFILE = 'ssoDefaultProfile'; + public const MAIL_RECIPIENTS = 'mailRecipients'; + public const MAIL_EVENTS = 'mailEvents'; + public const DATABASE_VERSION = 'databaseVersion'; + public const CONFIG_DATE = 'configDate'; + public const ACCOUNT_EXPIRE_ENABLED = 'accountExpireEnabled'; + public const ACCOUNT_EXPIRE_TIME = 'accountExpireTime'; + public const LDAP_TLS_ENABLED = 'ldapTlsEnabled'; + public const FILES_ALLOWED_MIME = 'filesAllowedMime'; + public const LDAP_TYPE = 'ldapType'; + public const APP_VERSION = 'appVersion'; + public const APPLICATION_URL = 'applicationUrl'; + public const LDAP_FILTER_USER_OBJECT = 'ldapFilterUserObject'; + public const LDAP_FILTER_GROUP_OBJECT = 'ldapFilterGroupObject'; + public const LDAP_FILTER_USER_ATTRIBUTES = 'ldapFilterUserAttributes'; + public const LDAP_FILTER_GROUP_ATTRIBUTES = 'ldapFilterGroupAttributes'; + public const LDAP_DATABASE_ENABLED = 'ldapDatabaseEnabled'; public function getAttributes(): array;