Horde_Imap_Client_Socket::_getMboxFormatOb PHP Method

_getMboxFormatOb() protected method

Return the proper mailbox format object based on the server's capabilities.
protected _getMboxFormatOb ( string $mailbox, boolean $list = false ) : Horde_Imap_Client_Data_Format_Mailbox
$mailbox string The mailbox.
$list boolean Is this object used in a LIST command?
return Horde_Imap_Client_Data_Format_Mailbox A mailbox format object.
    protected function _getMboxFormatOb($mailbox, $list = false)
    {
        if ($this->_capability()->isEnabled('UTF8=ACCEPT')) {
            try {
                return $list ? new Horde_Imap_Client_Data_Format_ListMailbox_Utf8($mailbox) : new Horde_Imap_Client_Data_Format_Mailbox_Utf8($mailbox);
            } catch (Horde_Imap_Client_Data_Format_Exception $e) {
            }
        }
        return $list ? new Horde_Imap_Client_Data_Format_ListMailbox($mailbox) : new Horde_Imap_Client_Data_Format_Mailbox($mailbox);
    }