/** * get sieve script as string * * @return string */ public function getSieve() { $sieve = parent::getSieve(); $pseudoScript = $this->_getPseudoScript(); $sieve = $sieve . $pseudoScript; return $sieve; }
/** * get sieve script as string * * @return string */ public function getSieve() { $sieve = parent::getSieve(); $this->save(); return $sieve; }
/** * put updated sieve script * * @param string|Expressomail_Model_Account $_accountId * @param Expressomail_Sieve_Backend_Abstract $_script * @throws Expressomail_Exception_Sieve */ protected function _putScript($_accountId, $_script) { $scriptToPut = $_script->getSieve(); if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . $scriptToPut); } try { $this->_setSieveBackendAndAuthenticate($_accountId); $this->_backend->putScript($this->_scriptName, $scriptToPut); $this->activateScript($_accountId); } catch (Zend_Mail_Protocol_Exception $zmpe) { if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . $zmpe->getTraceAsString()); } throw new Expressomail_Exception_SievePutScriptFail($zmpe->getMessage()); } }
/** * copy data from another script * * @param Expressomail_Sieve_Backend_Abstract $_scriptToCopyFrom */ public function getDataFromScript(Expressomail_Sieve_Backend_Abstract $_scriptToCopyFrom) { $this->_vacation = $_scriptToCopyFrom->getVacation(); $this->_rules = $_scriptToCopyFrom->getRules(); }