Horde_Imap_Client_Base::setComparator PHP Method

setComparator() public method

Set the comparator to use for searching/sorting (RFC 5255).
public setComparator ( string $comparator = null )
$comparator string The comparator string (see RFC 4790 [3.1] - "collation-id" - for format). The reserved string 'default' can be used to select the default comparator.
    public function setComparator($comparator = null)
    {
        $comp = is_null($comparator) ? $this->getParam('comparator') : $comparator;
        if (is_null($comp)) {
            return;
        }
        $this->login();
        if (!$this->_capability('I18NLEVEL', '2')) {
            throw new Horde_Imap_Client_Exception_NoSupportExtension('I18NLEVEL', 'The IMAP server does not support changing SEARCH/SORT comparators.');
        }
        $this->_setComparator($comp);
    }