SyncResult
in package
Stores the changes reported by the server to be processed during a sync operation.
This class is used internally only by the Sync service.
Table of Contents
- $changedObjects : array<string|int, mixed>
- URIs and ETags of new or changed address objects.
- $deletedObjects : array<int, string>
- URIs of deleted objects.
- $syncAgain : bool
- True if the server limited the returned differences and another followup sync is needed.
- $syncToken : string
- The new sync token returned by the server.
- __construct() : mixed
- Construct a new sync result.
- createVCards() : bool
- Creates VCard objects for all changed cards.
Properties
$changedObjects
URIs and ETags of new or changed address objects.
public
array<string|int, mixed>
$changedObjects
= []
Tags
$deletedObjects
URIs of deleted objects.
public
array<int, string>
$deletedObjects
= []
Tags
$syncAgain
True if the server limited the returned differences and another followup sync is needed.
public
bool
$syncAgain
= false
$syncToken
The new sync token returned by the server.
public
string
$syncToken
Methods
__construct()
Construct a new sync result.
public
__construct(string $syncToken) : mixed
Parameters
- $syncToken : string
-
The new sync token returned by the server.
Return values
mixed —createVCards()
Creates VCard objects for all changed cards.
public
createVCards() : bool
The objects are inserted into the SyncResult::$changedObjects array. In case the VCard object cannot be created for some of the cards (for example parse error), an error is logged. If no vcard string data is available in SyncResult::$changedObjects for a VCard, a warning is logged.
Return values
bool —True if a VCard could be created for all cards in SyncResult::$changedObjects, false otherwise.