protected function setDefaultAssign()
 {
     $this->showSetMessages();
     if (!$this->app->configIsEmpty('localTest')) {
         $this->app->getTemplateEngine()->assign(array('localTest' => $this->app->config('localTest')));
     }
     $this->app->getTemplateEngine()->assign(array('isLogin' => false, 'baseUrl' => $this->app->config('baseUrl'), 'themeUrl' => $this->app->getTheme()->getPublicBaseUrl(), 'xmlLang' => $this->app->getXmlLang(), 'language' => $this->app->getLanguage(), 'clientConfig' => $this->app->clientConfig(), 'isAjax' => $this->app->isAjax(), 'params' => $this->params, 'route' => $this->getControllerPath(), 'action' => $this->getCurrentAction()));
 }
Example #2
0
 private function initMail()
 {
     require_once $this->app->config('basePath') . 'library/PHPMailer/class.phpmailer.php';
     $crypt = new EncryptionClass();
     $this->_mail = new \PHPMailer();
     $this->_mail->IsSMTP();
     // Set mailer to use SMTP
     $this->_mail->Host = $this->app->config('smtpHost');
     // Specify main and backup server
     $this->_mail->SMTPAuth = true;
     // Enable SMTP authentication
     $this->_mail->Username = $this->app->config('smtpUsername');
     // SMTP username
     $this->_mail->Password = $crypt->decrypt($this->app->config('globalSalt'), $this->app->config('smtpPassword'));
     // SMTP password
     $this->_mail->SMTPSecure = $this->app->config('smtpSecurity');
     // Enable encryption, 'ssl' also accepted
     $this->_mail->Port = $this->app->config("smtpPort");
     $this->_mail->From = $this->app->config('senderEmail');
     $this->_mail->FromName = $this->app->config('senderName');
     $this->_mail->AddReplyTo($this->app->config('replyToEmail'), $this->app->config('replyToName'));
     $this->_mail->WordWrap = 100;
     //		$this->_mail->SMTPDebug = 1; // for debugging
 }