PHP Class Horde_ActiveSync_Connector_Importer, horde

Author: Michael J Rubinsky ([email protected])
Mostrar archivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_as Horde_ActiveSync The server object.
$_flags integer Conflict resolution flags
$_folderId string The backend specific folder id
$_folderUid string The EAS folder uid
$_logger Horde_Log_Logger Logger
$_procid integer Process id for logging.
$_state Horde_ActiveSync_State_Base State machine

Public Methods

Method Description
__construct ( Horde_ActiveSync $as ) Const'r
importFolderChange ( string $uid, string $displayname, string $parent = Horde_ActiveSync::FOLDER_ROOT, integer $type = null ) : Horde_ActiveSync_Message_Folder Import a folder change from the wbxml stream
importFolderDeletion ( string $uid, string $parent = Horde_ActiveSync::FOLDER_ROOT ) Imports a folder deletion from the client.
importMessageChange ( string | boolean $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device, integer $clientid, string $class = false, string $synckey = false ) : array | boolean Import a message change from the wbxml stream
importMessageDeletion ( array $ids, string $class, boolean $instanceids = false ) : array Import message deletions. This may conflict if the local object has been modified.
importMessageMove ( array $uids, string $dst, string $class = null ) : array Perform a message move initiated on the clinet.
importMessageReadFlag ( integer $id, string $flag ) Import a change in 'read' flags. This can never conflict.
init ( Horde_ActiveSync_State_Base $state, string $folderId = null, integer $flags ) Initialize the importer for this collection
setLogger ( Horde_Log_Logger $logger ) Setter for a logger instance

Protected Methods

Method Description
_isConflict ( string $type, string $folderid, string $id ) : boolean Check if this change conflicts with server changes This is only true in the following situations:

Method Details

__construct() public method

Const'r
public __construct ( Horde_ActiveSync $as )
$as Horde_ActiveSync The server object.

_isConflict() protected method

Changed here and changed there Changed here and deleted there Deleted here and changed there Any other combination of operations can be done (e.g. change flags & move or move & delete)
protected _isConflict ( string $type, string $folderid, string $id ) : boolean
$type string The type of change('change', 'delete' etc...)
$folderid string The id of the folder this change is from.
$id string The uid for the changed message.
return boolean

importFolderChange() public method

Import a folder change from the wbxml stream
public importFolderChange ( string $uid, string $displayname, string $parent = Horde_ActiveSync::FOLDER_ROOT, integer $type = null ) : Horde_ActiveSync_Message_Folder
$uid string The folder uid
$displayname string The folder display name
$parent string The parent folder id.
$type integer The EAS Folder type. @since 2.9.0
return Horde_ActiveSync_Message_Folder The new folder object.

importFolderDeletion() public method

Imports a folder deletion from the client.
public importFolderDeletion ( string $uid, string $parent = Horde_ActiveSync::FOLDER_ROOT )
$uid string The folder uid
$parent string The folder id of the parent folder.

importMessageChange() public method

Import a message change from the wbxml stream
public importMessageChange ( string | boolean $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device, integer $clientid, string $class = false, string $synckey = false ) : array | boolean
$id string | boolean A server message id or false if a new message.
$message Horde_ActiveSync_Message_Base A message object
$device Horde_ActiveSync_Device A device descriptor
$clientid integer Client id sent from client. on message addition.
$class string The collection class - needed for SMS since the actual serverid will be for an email folder. @since 2.6.0
$synckey string The synckey currently being processed when processing a SYNC_MODIFY command. @since 2.31.0
return array | boolean A stat array, or an array containing the 'error' key on error, or false on duplicate addition.

importMessageDeletion() public method

Import message deletions. This may conflict if the local object has been modified.
public importMessageDeletion ( array $ids, string $class, boolean $instanceids = false ) : array
$ids array Server message uids to delete
$class string The server collection class.
$instanceids boolean If true, $ids is a hash of instanceids => uids. @since 2.31.0
return array An array containing ids of successfully deleted messages.

importMessageMove() public method

Perform a message move initiated on the clinet.
public importMessageMove ( array $uids, string $dst, string $class = null ) : array
$uids array The source message ids.
$dst string The destination folder uid.
$class string The collection class (only needed for SMS). @since 2.10.0
return array An array containing the following keys: - results: An array with old uids as keys and new uids as values. - missing: An array containing source uids that were not found on the IMAP server.

importMessageReadFlag() public method

Import a change in 'read' flags. This can never conflict.
public importMessageReadFlag ( integer $id, string $flag )
$id integer Server message id (The IMAP UID).
$flag string The state of the /seen flag

init() public method

Initialize the importer for this collection
public init ( Horde_ActiveSync_State_Base $state, string $folderId = null, integer $flags )
$state Horde_ActiveSync_State_Base The state machine.
$folderId string The collection's uid.
$flags integer Conflict resolution flags.

setLogger() public method

Setter for a logger instance
public setLogger ( Horde_Log_Logger $logger )
$logger Horde_Log_Logger The logger

Property Details

$_as protected_oe property

The server object.
protected Horde_ActiveSync $_as
return Horde_ActiveSync

$_flags protected_oe property

Conflict resolution flags
protected int $_flags
return integer

$_folderId protected_oe property

The backend specific folder id
protected string $_folderId
return string

$_folderUid protected_oe property

The EAS folder uid
protected string $_folderUid
return string

$_logger protected_oe property

Logger
protected Horde_Log_Logger $_logger
return Horde_Log_Logger

$_procid protected_oe property

Process id for logging.
protected int $_procid
return integer

$_state protected_oe property

State machine
protected Horde_ActiveSync_State_Base $_state
return Horde_ActiveSync_State_Base