Пример #1
0
 /**
  * @return void
  */
 protected function __construct()
 {
     $this->oHttp = \MailSo\Base\Http::NewInstance();
     $this->oActions = Actions::NewInstance();
     $this->oActions->SetHttp($this->oHttp);
     $this->oTwilio = $this->oActions->GetTwilio();
     \CApi::Plugin()->SetActions($this->oActions);
     //		\MailSo\Config::$FixIconvByMbstring = false;
     \MailSo\Config::$SystemLogger = \CApi::MailSoLogger();
 }
Пример #2
0
 /**
  * @return void
  */
 protected function __construct()
 {
     $this->oHttp = \MailSo\Base\Http::NewInstance();
     $this->oActions = Actions::NewInstance();
     $this->oActions->SetHttp($this->oHttp);
     $this->oTwilio = $this->oActions->GetTwilio();
     \CApi::Plugin()->SetActions($this->oActions);
     //		\MailSo\Config::$FixIconvByMbstring = false;
     \MailSo\Config::$SystemLogger = \CApi::MailSoLogger();
     \MailSo\Config::$PreferStartTlsIfAutoDetect = !!\CApi::GetConf('labs.prefer-starttls', true);
 }
Пример #3
0
 /**
  * @return void
  */
 private function __construct()
 {
     $this->oHttp = \MailSo\Base\Http::SingletonInstance();
     $this->oActions = Actions::NewInstance();
     \set_error_handler(array(&$this, 'LogPhpErrorHandler'));
     $this->oServiceActions = new \RainLoop\ServiceActions($this->oHttp, $this->oActions);
     if ($this->oActions->Config()->Get('debug', 'enable', false)) {
         \error_reporting(E_ALL);
         \ini_set('display_errors', 1);
     }
     if ($this->oActions->Config()->Get('labs', 'disable_iconv_if_mbstring_supported', false) && \class_exists('MailSo\\Capa') && \MailSo\Base\Utils::IsMbStringSupported()) {
         \MailSo\Config::$ICONV = false;
     }
     $sServer = \trim($this->oActions->Config()->Get('security', 'custom_server_signature', ''));
     if (0 < \strlen($sServer)) {
         @\header('Server: ' . $sServer, true);
     }
     if ($this->oActions->Config()->Get('labs', 'force_https', false) && !$this->oHttp->IsSecure()) {
         @\header('Location: https://' . $this->oHttp->GetHost(false, false) . $this->oHttp->GetUrl(), true);
         exit;
     }
 }