getCachedUids() abstract public method

Get the list of cached UIDs.
abstract public getCachedUids ( string $mailbox, integer $uidvalid ) : array
$mailbox string An IMAP mailbox string.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
return array The (unsorted) list of cached UIDs.
Exemplo n.º 1
0
 /**
  * Get information from the cache.
  *
  * @param string $mailbox    An IMAP mailbox string.
  * @param array $uids        The list of message UIDs to retrieve
  *                           information for. If empty, returns the list
  *                           of cached UIDs.
  * @param array $fields      An array of fields to retrieve. If empty,
  *                           returns all cached fields.
  * @param integer $uidvalid  The IMAP uidvalidity value of the mailbox.
  *
  * @return array  An array of arrays with the UID of the message as the
  *                key (if found) and the fields as values (will be
  *                undefined if not found). If $uids is empty, returns the
  *                full (unsorted) list of cached UIDs.
  */
 public function get($mailbox, array $uids = array(), $fields = array(), $uidvalid = null)
 {
     $mailbox = strval($mailbox);
     if (empty($uids)) {
         $ret = $this->_backend->getCachedUids($mailbox, $uidvalid);
     } else {
         $ret = $this->_backend->get($mailbox, $uids, $fields, $uidvalid);
         if ($this->_debug && !empty($ret)) {
             $this->_debug->info(sprintf('CACHE: Retrieved messages (%s [%s; %s])', empty($fields) ? 'ALL' : implode(',', $fields), $mailbox, $this->_baseob->getIdsOb(array_keys($ret))->tostring_sort));
         }
     }
     return $ret;
 }