Property | Type | Description | |
---|---|---|---|
$_data | array | The cache data. | |
$_devid | string | The device id | |
$_dirty | array | Track dirty properties. | |
$_logger | Horde_Log_Logger | Logger | |
$_procid | integer | Process id for logging. | |
$_state | Horde_ActiveSync_State_Base | The state driver | |
$_user | string | The username |
Method | Description | |
---|---|---|
__construct ( Horde_ActiveSync_State_Base $state, string $devid, string $user, Horde_Log_Logger $logger = null ) : Horde_ActiveSync_SyncCache | Constructor | |
__get ( $property ) | ||
__isset ( $property ) | ||
__set ( $property, $value ) | ||
addCollection ( array $collection ) | Add a new collection to the cache | |
addConfirmedKey ( string $key ) | Add a confirmed synckey to the cache. | |
clearCollectionKeys ( ) | Clear all synckeys from the known collections. | |
clearCollections ( ) | Remove all collection data. | |
clearFolders ( ) | Clear the folder cache | |
collectionExists ( stirng $collectionid ) : boolean | Check for the existance of a specific collection in the cache. | |
collectionIsPingable ( string $id ) : boolean | Check if a specified collection is PINGable. | |
countCollections ( ) | Return the count of available collections in the cache | |
delete ( ) | Delete the entire synccache from the backend. | |
deleteFolder ( string $folder ) | Remove a folder from the cache | |
getCollections ( boolean $requireKey = true ) : array | Return all the collections in the syncCache. | |
getFolder ( string $folder ) : array | boolean | Return an entry from the folder cache. | |
getFolders ( ) | Return the folders cache. | |
hasPingChangeFlag ( string $collectionid ) : boolean | Checks the status of the ping change flag. If true, the last PING request detected a change in the specified collection. | |
loadCacheFromStorage ( ) | Repopulate the cache data from storage. | |
refreshCollections ( ) | Refresh the cached collections from the state backend. | |
refreshFolderCache ( ) | Refresh the folder cache from the backend. | |
removeCollection ( string $id, boolean $purge = true ) | Remove a collection from the cache. | |
removeConfirmedKey ( string $key ) | Remove a confirmed sycnkey from the cache | |
removePingableCollection ( $id ) | Set a collection as non-PINGable. | |
resetPingChangeFlag ( string $id ) | Reset the specified collection's ping change flag. | |
save ( ) | Save the synccache to storage. | |
setPingChangeFlag ( string $id ) | Set the ping change flag on a collection. Indicatates that the last PING was terminated with a change in this collection. | |
setPingableCollection ( string $id ) | Set a specific collection to be PINGable. | |
updateCollection ( array $collection, array $options = [] ) | Update a collection in the cache. | |
updateFiltertype ( string $id, integer $filtertype ) | Update the filtertype for the specified collection. | |
updateFolder ( Horde_ActiveSync_Message_Folder $folder ) | Update a folder entry in the cache. | |
updateTimestamp ( ) | Update the cache timestamp to the current time. | |
updateWindowSize ( string $id, $windowsize ) | Update the windowsize for the specified collection. | |
validateCache ( boolean $hb_only = false ) : boolean | Validate the cache. Compares the cache timestamp with the current cache timestamp in the state backend. If the timestamps are different, some other request has modified the cache, so it should be invalidated. | |
validateCollectionsFromCache ( array &$collections ) | Validate the collections from the cache and fill in any missing values from the folder cache. | |
validateTimestamps ( ) : boolean | Perform some sanity checking on the various timestamps to ensure we are in a valid state. Basically checks that we are not currently running a looping sync and that the last looping sync ending normally. |
Method | Description | |
---|---|---|
_isValidProperty ( $property ) | ||
_markCollectionsDirty ( boolean $id ) | Mark specific collection as dirty, but only if the entire collection data is not already marked dirty. |
public __construct ( Horde_ActiveSync_State_Base $state, string $devid, string $user, Horde_Log_Logger $logger = null ) : Horde_ActiveSync_SyncCache | ||
$state | Horde_ActiveSync_State_Base | The state driver |
$devid | string | The device id |
$user | string | The username |
$logger | Horde_Log_Logger | The logger object |
return | Horde_ActiveSync_SyncCache |
protected _markCollectionsDirty ( boolean $id ) | ||
$id | boolean | The collection to mark dirty. |
public addCollection ( array $collection ) | ||
$collection | array | The collection array |
public addConfirmedKey ( string $key ) | ||
$key | string | The synckey to add. |
public clearCollectionKeys ( ) |
public collectionExists ( stirng $collectionid ) : boolean | ||
$collectionid | stirng | The collection id to search for. |
return | boolean |
public collectionIsPingable ( string $id ) : boolean | ||
$id | string | The collection id. |
return | boolean |
public countCollections ( ) |
public deleteFolder ( string $folder ) | ||
$folder | string | The folder id to remove. |
public getCollections ( boolean $requireKey = true ) : array | ||
$requireKey | boolean | If true, only return collections with an existing synckey in the cache. Otherwise return all collections. |
return | array |
public hasPingChangeFlag ( string $collectionid ) : boolean | ||
$collectionid | string | The collection id to check. |
return | boolean |
public loadCacheFromStorage ( ) |
public refreshCollections ( ) |
public refreshFolderCache ( ) |
public removeCollection ( string $id, boolean $purge = true ) | ||
$id | string | The collection id. |
$purge | boolean | If true, completely remove the collection entry otherwise, just resets the synckey. |
public removeConfirmedKey ( string $key ) | ||
$key | string | The synckey to remove. |
public removePingableCollection ( $id ) |
public resetPingChangeFlag ( string $id ) | ||
$id | string | The collectionid to reset. |
public setPingChangeFlag ( string $id ) | ||
$id | string | The collection id. |
public setPingableCollection ( string $id ) | ||
$id | string | The collection id. |
public updateCollection ( array $collection, array $options = [] ) | ||
$collection | array | The collection data to add/update. |
$options | array | Options: - newsynckey: (boolean) Set the new synckey in the collection. DEFAULT: false (Do not set the new synckey). - unsetChanges: (boolean) Unset the GETCHANGES flag in the collection. DEFAULT: false (Do not unset the GETCHANGES flag). - unsetPingChangeFlag: (boolean) Unset the PINGCHANGES flag in the collection. DEFUALT: false (Do not uset the PINGCHANGES flag). @since 2.3.0 |
public updateFiltertype ( string $id, integer $filtertype ) | ||
$id | string | The collection id. |
$filtertype | integer | The updated filtertype. |
public updateFolder ( Horde_ActiveSync_Message_Folder $folder ) | ||
$folder | Horde_ActiveSync_Message_Folder | The folder object. |
public updateTimestamp ( ) |
public updateWindowSize ( string $id, $windowsize ) | ||
$id | string | The collection id. |
public validateCache ( boolean $hb_only = false ) : boolean | ||
$hb_only | boolean | If true, only validate the hb timestamps. @since 2.4.0 |
return | boolean |
public validateCollectionsFromCache ( array &$collections ) | ||
$collections | array | A reference to an array of collections. |
public validateTimestamps ( ) : boolean | ||
return | boolean |
protected Horde_ActiveSync_State_Base $_state | ||
return | Horde_ActiveSync_State_Base |