/**
  * the constructor
  */
 public function __construct(array $_options = array())
 {
     parent::__construct($_options);
     // set domain from smtp config
     $this->_config['domain'] = !empty($this->_config['primarydomain']) ? $this->_config['primarydomain'] : null;
     // add allowed domains
     if (!empty($this->_config['primarydomain'])) {
         $this->_config['alloweddomains'] = array($this->_config['primarydomain']);
         if (!empty($this->_config['secondarydomains'])) {
             // merge primary and secondary domains and split secondary domains + trim whitespaces
             $this->_config['alloweddomains'] = array_merge($this->_config['alloweddomains'], preg_split('/\\s*,\\s*/', $this->_config['secondarydomains']));
         }
     }
     $this->_destinationTable = $this->_config['prefix'] . $this->_config['destinationTable'];
     $this->_forwardsTable = $this->_config['prefix'] . $this->_config['forwardsTable'];
 }
 /**
  * the constructor
  */
 public function __construct(array $_options = array())
 {
     parent::__construct($_options);
     // _quotaTable = dovecot_aliases
     $this->_quotasTable = $this->_config['prefix'] . $this->_config['quotaTable'];
     // set domain from imap config
     $this->_config['domain'] = !empty($this->_config['domain']) ? $this->_config['domain'] : null;
     // copy over default scheme, home, UID, GID from preconfigured defaults
     $this->_config['emailScheme'] = $this->_config['scheme'];
     $this->_config['emailHome'] = $this->_config['home'];
     $this->_config['emailUID'] = $this->_config['uid'];
     $this->_config['emailGID'] = $this->_config['gid'];
 }
 /**
  * the constructor
  */
 public function __construct(array $_options = array())
 {
     parent::__construct($_options);
     // set domain from smtp config
     $this->_config['domain'] = !empty($this->_config['primarydomain']) ? $this->_config['primarydomain'] : null;
     // add allowed domains
     if (!empty($this->_config['primarydomain'])) {
         $this->_config['alloweddomains'] = array($this->_config['primarydomain']);
         if (!empty($this->_config['secondarydomains'])) {
             // merge primary and secondary domains and split secondary domains + trim whitespaces
             $this->_config['alloweddomains'] = array_merge($this->_config['alloweddomains'], preg_split('/\\s*,\\s*/', $this->_config['secondarydomains']));
         }
     }
     $this->_clientId = Tinebase_Application::getInstance()->getApplicationByName('Tinebase')->getId();
     $this->_destinationTable = $this->_config['prefix'] . $this->_config['destinationTable'];
 }