Property | Type | Description | |
---|---|---|---|
$_clientAnchorNext | integer | Sync Anchors determine the interval from which changes are retrieved. | |
$_client_add_count | integer | Number of objects that have been sent to the server for adding. | |
$_client_addreplaces | integer | Add due to client replace request when map entry is not found. Happens during SlowSync. | |
$_client_delete_count | integer | Number of objects that have been sent to the server for deletion. | |
$_client_replace_count | integer | Number of objects that have been sent to the server for replacement. | |
$_errors | integer | Number of failed actions, for logging purposes only. | |
$_expectingMapData | boolean | Map data is expected whenever an add is sent to the client. | |
$_serverAnchorLast | |||
$_serverAnchorNext | |||
$_server_add_count | integer | Number of objects that have been sent to the client for adding. | |
$_server_adds | array | List of object UIDs (in the keys) that have been added on the server since the last synchronization and are supposed to be sent to the client. | |
$_server_delete_count | integer | Number of objects that have been sent to the client for deletion. | |
$_server_deletes | array | List of object UIDs (in the keys) that have been deleted on the server since the last synchronization and are supposed to be sent to the client. | |
$_server_largeobj | array | Array holding the remaining content when splitting a large object into multiple messages. Keys are numeric, values are: command, chunkContent, clientContentType, clientEncodingType, cuid, suid | |
$_server_replace_count | integer | Number of objects that have been sent to the client for replacement. | |
$_server_replaces | array | List of object UIDs (in the keys) that have been changed on the server since the last synchronization and are supposed to be sent to the client. | |
$_server_task_adds | array | This is only used for clients handling tasks and events in one database. We need to seperately store the server tasks adds, so when we get a Map command from the client, we know whether to put this in tasks or calendar. | |
$_sourceLocURI | string | Source (server) URI (database). | |
$_state | constant | A sync starts in Horde_SyncMl_Sync::STATE_INIT and moves on to the next state with every
|
|
$_syncType | integer | The synchronization method, one of the Horde_SyncMl::ALERT_* constants. | |
$_syncsReceived | integer | Counts the |
|
$_syncsSent | integer | Counts the |
|
$_targetLocURI | string | Target (client) URI (database). |
Method | Description | |
---|---|---|
__construct ( string $syncType, string $serverURI, string $clientURI, integer $serverAnchorLast, integer $serverAnchorNext, string $clientAnchorNext ) | ||
addSyncReceived ( ) | ||
closeSync ( ) | Completes a sync once everything is done: store the sync anchors so the next sync can be a delta sync and produce some debug info. | |
createSyncOutput ( &$output ) |
Creates a |
|
createUidMap ( $databaseURI, $cuid, $suid ) | ||
getClientAnchorNext ( ) | ||
getClientLocURI ( ) | ||
getServerAnchorLast ( ) | ||
getServerAnchorNext ( ) | ||
getServerChange ( string $change, string $id ) : string | Returns the client ID of server change identified by the change type and server ID. | |
getServerLocURI ( ) | ||
getSyncsReceived ( ) | * Currently unused | |
handleClientSyncItem ( &$output, Horde_SyncMl_SyncElement &$item ) | Here's where the actual processing of a client-sent Sync Item takes place. Entries are added, deleted or replaced from the server database by using backend API calls. | |
handleFinal ( &$output, $debug = false ) | Notifies the sync that a final has been received by the client. | |
hasPendingElements ( ) | Returns true if there are still outstanding server sync items to be sent to the client. | |
isComplete ( ) | ||
setServerChange ( string $change, string $sid, string $cid ) | Sets the client ID of server change identified by the change type and server ID. | |
unsetServerChange ( string $change, string $id ) | Unsets the server-client-map of server change identified by the change type and server ID. |
Method | Description | |
---|---|---|
_getServerLargeObjChunk ( integer $chunkLength ) : string | Get the next chunk from the cached large object with maximum length of chunkLength or return false. | |
_retrieveChanges ( string $syncDB, array &$adds, array &$replaces, array &$deletes ) | Retrieves and condenses the changes on the server side since the last synchronization. | |
_taskToCalendar ( $databaseURI ) | Converts a calendar databaseURI to a tasks databaseURI for devices with handleTasksInCalendar. |
protected _getServerLargeObjChunk ( integer $chunkLength ) : string | ||
$chunkLength | integer | The maximum length of the chunk. |
return | string | The next chunk of the cached large object. |
protected _retrieveChanges ( string $syncDB, array &$adds, array &$replaces, array &$deletes ) | ||
$syncDB | string | The database being synchronized. |
$adds | array | Will be set with the server-client-uid mappings of added objects. |
$replaces | array | Will be set with the server-client-uid mappings of changed objects. |
$deletes | array | Will be set with the server-client-uid mappings of deleted objects. |
protected _taskToCalendar ( $databaseURI ) |
public closeSync ( ) |
public createSyncOutput ( &$output ) |
public handleClientSyncItem ( &$output, Horde_SyncMl_SyncElement &$item ) | ||
$output | ||
$item | Horde_SyncMl_SyncElement |
public handleFinal ( &$output, $debug = false ) |
public hasPendingElements ( ) |
public unsetServerChange ( string $change, string $id ) | ||
$change | string | The change type (add, replace, delete). |
$id | string | The object's server UID. |
protected int $_clientAnchorNext | ||
return | integer |
protected int $_client_add_count | ||
return | integer |
protected int $_client_addreplaces | ||
return | integer |
protected int $_client_delete_count | ||
return | integer |
protected int $_client_replace_count | ||
return | integer |
protected int $_errors | ||
return | integer |
protected bool $_expectingMapData | ||
return | boolean |
protected int $_server_add_count | ||
return | integer |
protected array $_server_adds | ||
return | array |
protected int $_server_delete_count | ||
return | integer |
protected array $_server_deletes | ||
return | array |
protected array $_server_largeobj | ||
return | array |
protected int $_server_replace_count | ||
return | integer |
protected array $_server_replaces | ||
return | array |
protected array $_server_task_adds | ||
return | array |
protected string $_sourceLocURI | ||
return | string |
protected constant $_state | ||
return | constant |
protected int $_syncType | ||
return | integer |
protected int $_syncsReceived | ||
return | integer |
protected int $_syncsSent | ||
return | integer |
protected string $_targetLocURI | ||
return | string |