\Horde_Imap_Client_Socket_ClientSort

Client sorting methods for the Socket driver.

NOTE: This class is NOT intended to be accessed outside of a Base object. There is NO guarantees that the API of this class will not change across versions.

Summary

Methods
Properties
Constants
__construct()
clientSort()
threadOrderedSubject()
No public properties found
No constants found
_clientSortProcess()
_getSentDates()
_stableAsort()
_sortString()
$_collator
$_socket
N/A
No private methods found
No private properties found
N/A

Properties

$_collator

$_collator : \Collator

Collator object to use for sotring.

Type

\Collator

Methods

__construct()

__construct(\Horde_Imap_Client_Socket  $socket) 

Constructor.

Parameters

\Horde_Imap_Client_Socket $socket

Socket object.

clientSort()

clientSort(\Horde_Imap_Client_Ids  $res, array  $opts) : array

Sort search results client side if the server does not support the SORT IMAP extension (RFC 5256).

Parameters

\Horde_Imap_Client_Ids $res

The search results.

array $opts

The options to _search().

Throws

\Horde_Imap_Client_Exception

Returns

array —

The sort results.

threadOrderedSubject()

threadOrderedSubject(\Horde_Imap_Client_Fetch_Results  $data, boolean  $uids) : array

If server does not support the THREAD IMAP extension (RFC 5256), do ORDEREDSUBJECT threading on the client side.

Parameters

\Horde_Imap_Client_Fetch_Results $data

Fetch results.

boolean $uids

Are IDs UIDs?

Returns

array —

The thread sort results.

_clientSortProcess()

_clientSortProcess(  $res,   $fetch_res,   $sort) 

Parameters

$res
$fetch_res
$sort

_getSentDates()

_getSentDates(\Horde_Imap_Client_Fetch_Results  $data, array  $ids, boolean  $internal = false) : array

Get the sent dates for purposes of SORT/THREAD sorting under RFC 5256 [2.2].

Parameters

\Horde_Imap_Client_Fetch_Results $data

Data returned from fetch() that includes both date and envelope items.

array $ids

The IDs to process.

boolean $internal

Only use internal date?

Returns

array —

A mapping of IDs -> UNIX timestamps.

_sortString()

_sortString(  $sorted) 

Sort an array of strings based on current locale.

Parameters

$sorted