Horde_Imap_Client_Data_Format_Mailbox::binary PHP Method

binary() public method

public binary ( )
    public function binary()
    {
        if (parent::binary()) {
            // Mailbox data can NEVER be sent as binary.
            /* @todo: Disable until Horde_Imap_Client 3.0 */
            // throw new Horde_Imap_Client_Exception(
            //     'Client error: can not send mailbox to IMAP server as binary data.'
            // );
            // Temporary fix: send a blank mailbox string.
            $this->_mailbox = Horde_Imap_Client_Mailbox::get('');
        }
        return false;
    }

Usage Example

Beispiel #1
0
 public function testBadInput()
 {
     /* @todo: Change in Horde_Imap_Client 3.0 to detect Exception, instead
      * of blank mailbox name. */
     $ob = new Horde_Imap_Client_Data_Format_Mailbox("foo");
     /* binary() call creates the blank string representation. */
     $this->assertFalse($ob->binary());
     $this->assertEquals('', strval($ob));
 }