Horde_Imap_Client_Mailbox::equals PHP Method

equals() public method

Compares this mailbox to another mailbox string.
public equals ( $mbox ) : boolean
return boolean True if the items are equal.
    public function equals($mbox)
    {
        return $this->utf8 == $mbox;
    }

Usage Example

Esempio n. 1
0
 /**
  */
 protected function _renameMailbox(Horde_Imap_Client_Mailbox $old, Horde_Imap_Client_Mailbox $new)
 {
     // Some IMAP servers will not allow a rename of a currently open
     // mailbox.
     if ($old->equals($this->_selected)) {
         $this->close();
     }
     // RENAME returns no untagged information (RFC 3501 [6.3.5])
     $this->_sendCmd($this->_command('RENAME')->add(array(new Horde_Imap_Client_Data_Format_Mailbox($old), new Horde_Imap_Client_Data_Format_Mailbox($new))));
 }
All Usage Examples Of Horde_Imap_Client_Mailbox::equals