original_string: public function expunge($mailbox, array $options = array())
      {
          // Open mailbox call will handle the login.
          $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_READWRITE);
  
          /* Don't expunge if the mailbox is readonly. */
          if ($this->_mode == Horde_Imap_Client::OPEN_READONLY) {
              throw new Horde_Imap_Client_Exception(
                  Horde_Imap_Client_Translation::r("Cannot expunge read-only mailbox."),
                  Horde_Imap_Client_Exception::MAILBOX_READONLY
              );
          }
  
          if (empty($options['ids'])) {
              $options['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL);
          } elseif ($options['ids']->isEmpty()) {
              return $this->getIdsOb();
          }
  
          return $this->_expunge($options);
      }
code: public function expunge($mailbox, array $options = array())
      {
          // Open mailbox call will handle the login.
          $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_READWRITE);
  
          /* Don't expunge if the mailbox is readonly. */
          if ($this->_mode == Horde_Imap_Client::OPEN_READONLY) {
              throw new Horde_Imap_Client_Exception(
                  Horde_Imap_Client_Translation::r("Cannot expunge read-only mailbox."),
                  Horde_Imap_Client_Exception::MAILBOX_READONLY
              );
          }
  
          if (empty($options['ids'])) {
              $options['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL);
          } elseif ($options['ids']->isEmpty()) {
              return $this->getIdsOb();
          }
  
          return $this->_expunge($options);
      }
code_tokens: public function expunge ( $ mailbox , array $ options = array ( ) ) { // Open mailbox call will handle the login. $ this -> openMailbox ( $ mailbox , Horde_Imap_Client :: OPEN_READWRITE ) ; /* Don't expunge if the mailbox is readonly. */ if ( $ this -> _mode == Horde_Imap_Client :: OPEN_READONLY ) { throw new Horde_Imap_Client_Exception ( Horde_Imap_Client_Translation :: r ( "Cannot expunge read-only mailbox." ) , Horde_Imap_Client_Exception :: MAILBOX_READONLY ) ; } if ( empty ( $ options [ 'ids' ] ) ) { $ options [ 'ids' ] = $ this -> getIdsOb ( Horde_Imap_Client_Ids :: ALL ) ; } elseif ( $ options [ 'ids' ] -> isEmpty ( ) ) { return $ this -> getIdsOb ( ) ; } return $ this -> _expunge ( $ options ) ; }
docstring: Expunge deleted messages from the given mailbox.
  
  @param mixed $mailbox  The mailbox to expunge. Either a
  Horde_Imap_Client_Mailbox object or a string
  (UTF-8).
  @param array $options  Additional options:
  - delete: (boolean) If true, will flag all messages in 'ids' as
  deleted (since 2.10.0).
  DEFAULT: false
  - ids: (Horde_Imap_Client_Ids) A list of messages to expunge. These
  messages must already be flagged as deleted (unless 'delete'
  is true).
  DEFAULT: All messages marked as deleted will be expunged.
  - list: (boolean) If true, returns the list of expunged messages
  (UIDs only).
  DEFAULT: false
  
  @return Horde_Imap_Client_Ids  If 'list' option is true, returns the
  UID list of expunged messages.
  
  @throws Horde_Imap_Client_Exception
docstring_tokens: Expunge deleted messages from the given mailbox .