Example #1
0
 public function setError($errors)
 {
     if (!is_array($errors)) {
         $errors = array($errors);
     }
     parent::setError($errors);
     foreach ($errors as $error) {
         $this->logger->logError($error);
     }
 }
Example #2
0
 /**
  * @param bool $smtp_checked
  * @param string $server
  * @param string $login
  * @param string $password
  * @param int $port
  * @param string $encryption
  * @param string $email
  */
 public function __construct($smtp_checked, $server, $login, $password, $port, $encryption, $email)
 {
     parent::__construct();
     require_once _PS_CORE_DIR_ . '/tools/swift/swift_required.php';
     $this->smtp_checked = $smtp_checked;
     $this->server = $server;
     $this->login = $login;
     $this->password = $password;
     $this->port = $port;
     $this->encryption = $encryption;
     $this->email = $email;
 }
Example #3
0
 /**
  * @param bool $smtp_checked
  * @param string $server
  * @param string $login
  * @param string $password
  * @param int $port
  * @param string $encryption
  * @param string $email
  */
 public function __construct($smtp_checked, $server, $login, $password, $port, $encryption, $email)
 {
     parent::__construct();
     require_once _PS_INSTALL_PATH_ . '../tools/swift/Swift.php';
     require_once _PS_INSTALL_PATH_ . '../tools/swift/Swift/Connection/SMTP.php';
     require_once _PS_INSTALL_PATH_ . '../tools/swift/Swift/Connection/NativeMail.php';
     $this->smtp_checked = $smtp_checked;
     $this->server = $server;
     $this->login = $login;
     $this->password = $password;
     $this->port = $port;
     $this->encryption = $encryption;
     $this->email = $email;
 }
Example #4
0
 public function setError($errors)
 {
     static $logger = null;
     if (null === $logger) {
         $cacheDir = _PS_ROOT_DIR_ . '/app/logs/';
         $file = $cacheDir . (_PS_MODE_DEV_ ? 'dev' : 'prod') . '_' . @date('Ymd') . '_installation.log';
         $logger = new FileLogger();
         $logger->setFilename($file);
         $this->logger = $logger;
     }
     if (!is_array($errors)) {
         $errors = array($errors);
     }
     parent::setError($errors);
     foreach ($errors as $error) {
         $this->logger->logError($error);
     }
 }