public function sort(array $opts = array())
    {
        $this->_delimiter = isset($opts['delimiter'])
            ? $opts['delimiter']
            : '.';
        $this->_sortinbox = (!isset($opts['inbox']) || !empty($opts['inbox']));

        if (empty($opts['noupdate'])) {
            $mboxes = &$this->_mboxes;
        } else {
            $mboxes = $this->_mboxes;
        }

        uasort($mboxes, array($this, '_mboxCompare'));

        return $mboxes;
    }
public function sort(array $opts = array())
    {
        $this->_delimiter = isset($opts['delimiter'])
            ? $opts['delimiter']
            : '.';
        $this->_sortinbox = (!isset($opts['inbox']) || !empty($opts['inbox']));

        if (empty($opts['noupdate'])) {
            $mboxes = &$this->_mboxes;
        } else {
            $mboxes = $this->_mboxes;
        }

        uasort($mboxes, array($this, '_mboxCompare'));

        return $mboxes;
    }
public function sort ( array $ opts = array ( ) ) { $ this -> _delimiter = isset ( $ opts [ 'delimiter' ] ) ? $ opts [ 'delimiter' ] : '.' ; $ this -> _sortinbox = ( ! isset ( $ opts [ 'inbox' ] ) || ! empty ( $ opts [ 'inbox' ] ) ) ; if ( empty ( $ opts [ 'noupdate' ] ) ) { $ mboxes = & $ this -> _mboxes ; } else { $ mboxes = $ this -> _mboxes ; } uasort ( $ mboxes , array ( $ this , '_mboxCompare' ) ) ; return $ mboxes ; }
Sort the list of mailboxes.

@param array $opts  Options:
- delimiter: (string) The delimiter to use.
DEFAULT: '.'
- inbox: (boolean) Always put INBOX at the head of the list?
DEFAULT: Yes
- noupdate: (boolean) Do not update the object's mailbox list?
DEFAULT: true

@return array  List of sorted mailboxes (index association is kept).
Sort the list of mailboxes .