Example #1
0
 /**
  * @param \RainLoop\Account $oAccount
  * @param array $aFilters
  * @param string $sRaw = ''
  * @param bool $bRawIsActive = false
  *
  * @return bool
  */
 public function Save($oAccount, $aFilters, $sRaw = '', $bRawIsActive = false)
 {
     try {
         return $this->IsActive() ? $this->oDriver->Save($oAccount, $aFilters, $sRaw, $bRawIsActive) : false;
     } catch (\MailSo\Net\Exceptions\SocketCanNotConnectToHostException $oException) {
         throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
     } catch (\Exception $oException) {
         throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSaveFilters, $oException);
     }
     return false;
 }
Example #2
0
 /**
  * @param \RainLoop\Account $oAccount
  * @param array $aFilters
  * @param string $sRaw = ''
  * @param bool $bRawIsActive = false
  *
  * @return bool
  */
 public function Save($oAccount, $aFilters, $sRaw = '', $bRawIsActive = false)
 {
     try {
         return $this->IsActive() ? $this->oDriver->Save($oAccount, $aFilters, $sRaw, $bRawIsActive) : false;
     } catch (\MailSo\Net\Exceptions\SocketCanNotConnectToHostException $oException) {
         throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
     } catch (\MailSo\Sieve\Exceptions\NegativeResponseException $oException) {
         throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ClientViewError, $oException, \implode("\r\n", $oException->GetResponses()));
     } catch (\Exception $oException) {
         throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSaveFilters, $oException);
     }
     return false;
 }