Horde_Imap_Client_Socket::_store PHP Method

_store() protected method

protected _store ( $options )
    protected function _store($options)
    {
        $pipeline = $this->_storeCmd($options);
        $pipeline->data['modified'] = $this->getIdsOb();
        try {
            $resp = $this->_sendCmd($pipeline);
            /* Check for EXPUNGEISSUED (RFC 2180 [4.2]/RFC 5530 [3]). */
            if (!empty($resp->data['expungeissued'])) {
                $this->noop();
            }
            return $resp->data['modified'];
        } catch (Horde_Imap_Client_Exception_ServerResponse $e) {
            /* A NO response, when coupled with a sequence STORE and
             * non-SILENT behavior, most likely means that messages were
             * expunged. RFC 2180 [4.2] */
            if (empty($pipeline->data['store_silent']) && !empty($options['sequence']) && $e->status === Horde_Imap_Client_Interaction_Server::NO) {
                $this->noop();
            }
            return $pipeline->data['modified'];
        }
    }