Horde_Imap_Client_Socket::_deleteMsgs PHP Method

_deleteMsgs() protected method

protected _deleteMsgs ( Horde_Imap_Client_Mailbox $mailbox, Horde_Imap_Client_Ids $ids, array $opts = [] )
$mailbox Horde_Imap_Client_Mailbox
$ids Horde_Imap_Client_Ids
$opts array 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));
        }
    }