Horde_Imap_Client_Cache::getMetaData PHP Méthode

getMetaData() public méthode

Get metadata information for a mailbox.
public getMetaData ( string $mailbox, integer $uidvalid = null, array $entries = [] ) : array
$mailbox string An IMAP mailbox string.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
$entries array An array of entries to return. If empty, returns all metadata.
Résultat array The requested metadata. Requested entries that do not exist will be undefined. The following entries are defaults and always present: - uidvalid: (integer) The UIDVALIDITY of the mailbox.
    public function getMetaData($mailbox, $uidvalid = null, array $entries = array())
    {
        return $this->_backend->getMetaData(strval($mailbox), $uidvalid, $entries);
    }

Usage Example

Exemple #1
0
 /**
  * Updates the cached MODSEQ value.
  *
  * @param integer $modseq  MODSEQ value to store.
  *
  * @return mixed  The MODSEQ of the old value if it was replaced (or false
  *                if it didn't exist or is the same).
  */
 protected function _updateModSeq($modseq)
 {
     if (!$this->_initCache(true)) {
         return false;
     }
     $mbox_ob = $this->_mailboxOb();
     $uidvalid = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDVALIDITY);
     $md = $this->_cache->getMetaData($this->_selected, $uidvalid, array(self::CACHE_MODSEQ));
     if (isset($md[self::CACHE_MODSEQ])) {
         if ($md[self::CACHE_MODSEQ] < $modseq) {
             $set = true;
             $sync = $md[self::CACHE_MODSEQ];
         } else {
             $set = false;
             $sync = 0;
         }
         $mbox_ob->setStatus(Horde_Imap_Client::STATUS_SYNCMODSEQ, $md[self::CACHE_MODSEQ]);
     } else {
         $set = true;
         $sync = 0;
     }
     /* $modseq can be 0 - NOMODSEQ - so don't store in that case. */
     if ($set && $modseq) {
         $this->_cache->setMetaData($this->_selected, $uidvalid, array(self::CACHE_MODSEQ => $modseq));
     }
     return $sync;
 }
All Usage Examples Of Horde_Imap_Client_Cache::getMetaData