예제 #1
0
 /**
  * Set flags for massage in origin
  *
  * @param string $uid   - The UID of a message
  * @param array  $flags - array of flags
  *
  * @return $this;
  */
 public function setFlags($uid, $flags)
 {
     $this->ensureConnected();
     $id = $this->imap->getNumberByUniqueId($uid);
     $this->imap->setFlags($id, $flags);
     return $this;
 }
예제 #2
0
 /**
  * Convert uid to id if using uid
  *
  * @param int $uid
  *
  * @return int
  */
 protected function convertUidToId($uid)
 {
     if ($this->uidMode) {
         return $this->imap->getNumberByUniqueId($uid);
     } else {
         return $uid;
     }
 }
예제 #3
0
 /**
  * Prepares the Iterator to work
  */
 protected function initialize()
 {
     if ($this->ids === null) {
         $this->iterationMin = 1;
         $this->iterationMax = $this->imap->count();
     } else {
         $this->iterationMin = 0;
         $this->iterationMax = count($this->ids) - 1;
     }
 }
 /**
  * Rewind the Iterator to the first element
  */
 public function rewind()
 {
     if ($this->ids === null) {
         $this->iterationMin = 1;
         $this->iterationMax = $this->imap->count();
     } else {
         $this->iterationMin = 0;
         $this->iterationMax = count($this->ids) - 1;
     }
     if ($this->reverse) {
         $this->iterationPos = $this->iterationMax;
     } else {
         $this->iterationPos = $this->iterationMin;
     }
 }
 /**
  * Gets UIDVALIDITY of currently selected folder
  *
  * @return int
  * @throws \LogicException
  */
 public function getUidValidity()
 {
     $this->ensureConnected();
     return $this->imap->getUidValidity();
 }