Initial commit
This commit is contained in:
25
lib/Config.php
Normal file
25
lib/Config.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace OCA\CTAutoMailHooks;
|
||||
use OCP\ILogger;
|
||||
use \OCP\IConfig;
|
||||
class Config {
|
||||
const CONFIG_KEY = 'ct_auto_mail_hooks';
|
||||
const CONFIG_KEY_GLESYS_KEYS="glesys_keys";
|
||||
const CONFIG_KEY_EMAIL_ADDR_SUFFIX="email_suffix";
|
||||
private $logger;
|
||||
private $appConfiguration;
|
||||
private $logContext = ['app' => 'ct_auto_mail_hooks'];
|
||||
public function __construct(ILogger $logger, IConfig $nextCloudConfiguration) {
|
||||
$this->logger = $logger;
|
||||
$this->appConfiguration = $nextCloudConfiguration->getSystemValue(self::CONFIG_KEY);
|
||||
}
|
||||
public function getGlesysKeys() {
|
||||
return $this->getConfValue(self::CONFIG_KEY_GLESYS_KEYS);
|
||||
}
|
||||
public function getEmailAddressSuffix() {
|
||||
return $this->getConfValue(self::CONFIG_KEY_EMAIL_ADDR_SUFFIX);
|
||||
}
|
||||
private function getConfValue($configKey) {
|
||||
return $this->appConfiguration[$configKey];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user