コード例 #1
0
ファイル: ImapConnector.php プロジェクト: Maksold/platform
 /**
  * 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;
     }
 }
コード例 #4
0
 /**
  * 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;
     }
 }
コード例 #5
0
 /**
  * Gets UIDVALIDITY of currently selected folder
  *
  * @return int
  * @throws \LogicException
  */
 public function getUidValidity()
 {
     $this->ensureConnected();
     return $this->imap->getUidValidity();
 }