PHP Class Horde_ActiveSync_Folder_Imap, horde

Author: Michael J Rubinsky ([email protected])
Inheritance: extends Horde_ActiveSync_Folder_Base, implements Serializable
Mostrar archivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_added array Used for transporting changes back to activesync.
$_categories array Internal cache of custom message flags (i.e., categories). Should contain one entry for each UID listed in the $_changed array. An array keyed on message UID: uid => array('TestOne', 'TestTwo')
$_changed array Internal cache of message UIDs that have been modified on the server since the last sync. Used for transporting changes back to activesync.
$_flags array Internal cache of message flag changes. Should be one entry for each UID also listed in the $_changed array. Used for transporting changes back to activesync. An array keyed by message UID: uid => array('read' => 1)
$_messages array Note: This represents the folder list on the client and is affected by the FILTERTYPE on the collection.
$_primed boolean Internal flag to indicate initial first sync/prime.
$_removed array Internal cache of message UIDs that have been expunged from the IMAP server since last sync. Used for transporting changes back to activesync.
$_softDeleted array Array of messages to be SOFTDELETEd from client. Only used when we have a CONDSTORE server available, otherwise we calculate the uid list based on the cached data.

Public Methods

Method Description
__toString ( ) : string Convert the instance into a string.
added ( ) : array Return the list of UIDs that need to be added to the device.
categories ( ) : array Return the internal message category cache.
changed ( ) : array Return the list of UIDs that need to have flag changes sent to the device
checkValidity ( array $params = [] ) Check the validity of various values.
flags ( ) : array Return the internal message flags changes cache.
getSoftDeleted ( ) : array Return a list of message uids that should be SOFTDELETEd from the client.
messages ( ) : array Return the list of UIDs currently on the device.
minuid ( ) : integer Return the minimum IMAP UID contained in this folder.
modseq ( ) : string Return the folder's MODSEQ value.
primeFolder ( array $messages ) Sets initial message collection for servers that support MODSEQ. Much more effecient than using setChanges() when we know this is the initial folder "priming".
removed ( ) : array Return the list of UIDs that need to be removed from the device.
serialize ( ) : string Serialize this object.
setChanges ( array $messages, array $flags = [], array $categories = [], boolean $resetMinUid = false ) Set message changes.
setRemoved ( array $uids ) Set the list of expunged message UIDs.
setSoftDeleted ( array $softDeleted ) Set the list of uids to be SOFTDELETEd. Only needed for CONDSTORE servers.
total_messages ( ) : integer Return the total, unfiltered number of messages in the folder.
uidnext ( ) : string Return the folder's next UID number.
uidvalidity ( ) : string | boolean Return the folder's UID validity.
unserialize ( string $data ) Reconstruct the object from serialized data.
updateState ( ) Updates the internal UID cache if needed and clears the internal update/deleted/changed cache. To be called after all changes have been dealt with by the activesync client.

Protected Methods

Method Description
_fromSequenceString ( string $str ) : array Parse an IMAP message sequence string into a list of indices.
_toSequenceString ( array $ids ) : string Create an IMAP message sequence string from a list of indices.

Method Details

__toString() public method

Convert the instance into a string.
public __toString ( ) : string
return string The string representation for this instance.

_fromSequenceString() protected method

Parse an IMAP message sequence string into a list of indices.
See also: _toSequenceString()
protected _fromSequenceString ( string $str ) : array
$str string The IMAP message sequence string.
return array An array of indices.

_toSequenceString() protected method

Index Format: range_start:range_end,uid,uid2,...
protected _toSequenceString ( array $ids ) : string
$ids array An array of UIDs.
return string The IMAP message sequence string.

added() public method

Return the list of UIDs that need to be added to the device.
public added ( ) : array
return array The list of UIDs.

categories() public method

Return the internal message category cache.
public categories ( ) : array
return array The array of message categories. @see self::$_categories

changed() public method

Return the list of UIDs that need to have flag changes sent to the device
public changed ( ) : array
return array The list of UIDs.

checkValidity() public method

Check the validity of various values.
public checkValidity ( array $params = [] )
$params array A status array containing status to check.

flags() public method

Return the internal message flags changes cache.
public flags ( ) : array
return array The array of message flag changes.

getSoftDeleted() public method

Must be called after setChanges and setRemoved, but before updateState.
public getSoftDeleted ( ) : array
return array

messages() public method

Return the list of UIDs currently on the device.
public messages ( ) : array
return array The list of backend messages.

minuid() public method

Return the minimum IMAP UID contained in this folder.
public minuid ( ) : integer
return integer The IMAP UID.

modseq() public method

Return the folder's MODSEQ value.
public modseq ( ) : string
return string The MODSEQ number.

primeFolder() public method

Sets initial message collection for servers that support MODSEQ. Much more effecient than using setChanges() when we know this is the initial folder "priming".
public primeFolder ( array $messages )
$messages array Array of message UIDs for the initial message set for this folder.

removed() public method

Return the list of UIDs that need to be removed from the device.
public removed ( ) : array
return array The list of UIDs.

serialize() public method

Serialize this object.
public serialize ( ) : string
return string The serialized data.

setChanges() public method

Set message changes.
public setChanges ( array $messages, array $flags = [], array $categories = [], boolean $resetMinUid = false )
$messages array An array of message UIDs.
$flags array A hash of message read flags, keyed by UID.
$categories array A hash of custom message flags, keyed by UID. @since 2.17.0
$resetMinUid boolean If true, reset the minimum UID. Should be used when FilterType has widened and messages older than originally selected are being returned. @since 2.24.0

setRemoved() public method

Set the list of expunged message UIDs.
public setRemoved ( array $uids )
$uids array An array of message UIDs that have been expunged.

setSoftDeleted() public method

Set the list of uids to be SOFTDELETEd. Only needed for CONDSTORE servers.
public setSoftDeleted ( array $softDeleted )
$softDeleted array The message UID list.

total_messages() public method

Return the total, unfiltered number of messages in the folder.
public total_messages ( ) : integer
return integer The total number of messages.

uidnext() public method

Return the folder's next UID number.
public uidnext ( ) : string
return string The next UID number.

uidvalidity() public method

Return the folder's UID validity.
public uidvalidity ( ) : string | boolean
return string | boolean The folder UID validity marker, or false if not set.

unserialize() public method

Reconstruct the object from serialized data.
public unserialize ( string $data )
$data string The serialized data.

updateState() public method

Updates the internal UID cache if needed and clears the internal update/deleted/changed cache. To be called after all changes have been dealt with by the activesync client.
public updateState ( )

Property Details

$_added protected_oe property

Used for transporting changes back to activesync.
protected array $_added
return array

$_categories protected_oe property

Internal cache of custom message flags (i.e., categories). Should contain one entry for each UID listed in the $_changed array. An array keyed on message UID: uid => array('TestOne', 'TestTwo')
protected array $_categories
return array

$_changed protected_oe property

Internal cache of message UIDs that have been modified on the server since the last sync. Used for transporting changes back to activesync.
protected array $_changed
return array

$_flags protected_oe property

Internal cache of message flag changes. Should be one entry for each UID also listed in the $_changed array. Used for transporting changes back to activesync. An array keyed by message UID: uid => array('read' => 1)
protected array $_flags
return array

$_messages protected_oe property

Note: This represents the folder list on the client and is affected by the FILTERTYPE on the collection.
protected array $_messages
return array

$_primed protected_oe property

Internal flag to indicate initial first sync/prime.
protected bool $_primed
return boolean

$_removed protected_oe property

Internal cache of message UIDs that have been expunged from the IMAP server since last sync. Used for transporting changes back to activesync.
protected array $_removed
return array

$_softDeleted protected_oe property

Array of messages to be SOFTDELETEd from client. Only used when we have a CONDSTORE server available, otherwise we calculate the uid list based on the cached data.
protected array $_softDeleted
return array