12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- declare(strict_types=1);
- namespace OCA\ShareByMail\Settings;
- use OCP\IConfig;
- class SettingsManager {
- private $sendPasswordByMailDefault = 'yes';
- private $replyToInitiatorDefault = 'yes';
- public function __construct(
- private IConfig $config,
- ) {
- }
-
- public function sendPasswordByMail(): bool {
- $sendPasswordByMail = $this->config->getAppValue('sharebymail', 'sendpasswordmail', $this->sendPasswordByMailDefault);
- return $sendPasswordByMail === 'yes';
- }
-
- public function replyToInitiator(): bool {
- $replyToInitiator = $this->config->getAppValue('sharebymail', 'replyToInitiator', $this->replyToInitiatorDefault);
- return $replyToInitiator === 'yes';
- }
- }
|