STATE_INIT
STATE_INIT
Copyright 2003-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
$_state : \constant
State of the current sync.
A sync starts in Horde_SyncMl_Sync::STATE_INIT and moves on to the next state with every
$_server_task_adds : array
List of task UIDs (in the keys) that have been added on the server since the last synchronization and are supposed to be sent to the client.
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.
__construct(string $syncType, string $serverURI, string $clientURI, integer $serverAnchorLast, integer $serverAnchorNext, string $clientAnchorNext)
string | $syncType | |
string | $serverURI | |
string | $clientURI | |
integer | $serverAnchorLast | |
integer | $serverAnchorNext | |
string | $clientAnchorNext |
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.
$output | ||
\Horde_SyncMl_SyncElement | $item |
handleFinal( $output, $debug = false)
Notifies the sync that a final has been received by the client.
Depending on the current state of the sync this can mean various things: a) Init phase (Alerts) done. Next package contaings actual syncs. b) Sync sending from client done. Next package are maps (or finish or finish if ONE_WAY_FROM_CLIENT sync c) Maps finished, completly done.
$output | ||
$debug |
getServerChange(string $change, string $id) : string
Returns the client ID of server change identified by the change type and server ID.
string | $change | The change type (add, replace, delete). |
string | $id | The object's server UID. |
The matching client ID or null if none found.
_retrieveChanges(string $syncDB, array $adds, array $replaces, array $deletes)
Retrieves and condenses the changes on the server side since the last synchronization.
string | $syncDB | The database being synchronized. |
array | $adds | Will be set with the server-client-uid mappings of added objects. |
array | $replaces | Will be set with the server-client-uid mappings of changed objects. |
array | $deletes | Will be set with the server-client-uid mappings of deleted objects. |
_getServerLargeObjChunk(integer $chunkLength) : string
Get the next chunk from the cached large object with maximum length of chunkLength or return false.
integer | $chunkLength | The maximum length of the chunk. |
The next chunk of the cached large object.