Delete messages in the cache.
protected _deleteMsgs ( Horde_Imap_Client_Mailbox $mailbox, Horde_Imap_Client_Ids $ids, array $opts = [] ) : Horde_Imap_Client_Ids | ||
$mailbox | Horde_Imap_Client_Mailbox | The mailbox. |
$ids | Horde_Imap_Client_Ids | The list of IDs to delete in $mailbox. |
$opts | array | Additional options (not used in base class). |
return | Horde_Imap_Client_Ids | UIDs that were deleted. |
/** * @param array $opts Options: * - decrement: (boolean) If true, decrement the message count. * - pipeline: (Horde_Imap_Client_Interaction_Pipeline) Pipeline object. */ protected function _deleteMsgs(Horde_Imap_Client_Mailbox $mailbox, Horde_Imap_Client_Ids $ids, array $opts = array()) { /* If there are pending FETCH cache writes, we need to write them * before the UID -> sequence number mapping changes. */ if (isset($opts['pipeline'])) { $this->_updateCache($opts['pipeline']->fetch); } $res = parent::_deleteMsgs($mailbox, $ids); if (isset($this->_temp['expunged'])) { $this->_temp['expunged']->add($res); } if (!empty($opts['decrement'])) { $mbox_ob = $this->_mailboxOb(); $mbox_ob->setStatus(Horde_Imap_Client::STATUS_MESSAGES, $mbox_ob->getStatus(Horde_Imap_Client::STATUS_MESSAGES) - count($ids)); } }