PHP Класс Horde_ActiveSync_SyncCache, horde

Автор: Michael J Rubinsky ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_isValidProperty ( $property )
_markCollectionsDirty ( boolean $id ) Mark specific collection as dirty, but only if the entire collection data is not already marked dirty.

Описание методов

__construct() публичный Метод

Constructor
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
Результат Horde_ActiveSync_SyncCache

__get() публичный Метод

public __get ( $property )

__isset() публичный Метод

public __isset ( $property )

__set() публичный Метод

public __set ( $property, $value )

_isValidProperty() защищенный Метод

protected _isValidProperty ( $property )

_markCollectionsDirty() защищенный Метод

Mark specific collection as dirty, but only if the entire collection data is not already marked dirty.
protected _markCollectionsDirty ( boolean $id )
$id boolean The collection to mark dirty.

addCollection() публичный Метод

Add a new collection to the cache
public addCollection ( array $collection )
$collection array The collection array

addConfirmedKey() публичный Метод

Add a confirmed synckey to the cache.
public addConfirmedKey ( string $key )
$key string The synckey to add.

clearCollectionKeys() публичный Метод

Clear all synckeys from the known collections.
public clearCollectionKeys ( )

clearCollections() публичный Метод

Remove all collection data.
public clearCollections ( )

clearFolders() публичный Метод

Clear the folder cache
public clearFolders ( )

collectionExists() публичный Метод

Check for the existance of a specific collection in the cache.
public collectionExists ( stirng $collectionid ) : boolean
$collectionid stirng The collection id to search for.
Результат boolean

collectionIsPingable() публичный Метод

Check if a specified collection is PINGable.
public collectionIsPingable ( string $id ) : boolean
$id string The collection id.
Результат boolean

countCollections() публичный Метод

Return the count of available collections in the cache
public countCollections ( )

delete() публичный Метод

Delete the entire synccache from the backend.
public delete ( )

deleteFolder() публичный Метод

Remove a folder from the cache
public deleteFolder ( string $folder )
$folder string The folder id to remove.

getCollections() публичный Метод

Return all the collections in the syncCache.
public getCollections ( boolean $requireKey = true ) : array
$requireKey boolean If true, only return collections with an existing synckey in the cache. Otherwise return all collections.
Результат array

getFolder() публичный Метод

Return an entry from the folder cache.
public getFolder ( string $folder ) : array | boolean
$folder string The folder id to return.
Результат array | boolean The folder cache array entry, false if not found.

getFolders() публичный Метод

Return the folders cache.
public getFolders ( )

hasPingChangeFlag() публичный Метод

Checks the status of the ping change flag. If true, the last PING request detected a change in the specified collection.
С версии: 2.3.0
public hasPingChangeFlag ( string $collectionid ) : boolean
$collectionid string The collection id to check.
Результат boolean

loadCacheFromStorage() публичный Метод

Repopulate the cache data from storage.

refreshCollections() публичный Метод

Refresh the cached collections from the state backend.
public refreshCollections ( )

refreshFolderCache() публичный Метод

Refresh the folder cache from the backend.
С версии: 2.18.0
public refreshFolderCache ( )

removeCollection() публичный Метод

Remove a collection from the cache.
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.

removeConfirmedKey() публичный Метод

Remove a confirmed sycnkey from the cache
public removeConfirmedKey ( string $key )
$key string The synckey to remove.

removePingableCollection() публичный Метод

Set a collection as non-PINGable.
public removePingableCollection ( $id )

resetPingChangeFlag() публичный Метод

Reset the specified collection's ping change flag.
С версии: 2.3.0
public resetPingChangeFlag ( string $id )
$id string The collectionid to reset.

save() публичный Метод

Save the synccache to storage.
public save ( )

setPingChangeFlag() публичный Метод

Set the ping change flag on a collection. Indicatates that the last PING was terminated with a change in this collection.
С версии: 2.3.0
public setPingChangeFlag ( string $id )
$id string The collection id.

setPingableCollection() публичный Метод

Set a specific collection to be PINGable.
public setPingableCollection ( string $id )
$id string The collection id.

updateCollection() публичный Метод

Update a collection in the cache.
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

updateFiltertype() публичный Метод

Update the filtertype for the specified collection.
С версии: 2.26.0
public updateFiltertype ( string $id, integer $filtertype )
$id string The collection id.
$filtertype integer The updated filtertype.

updateFolder() публичный Метод

Update a folder entry in the cache.
public updateFolder ( Horde_ActiveSync_Message_Folder $folder )
$folder Horde_ActiveSync_Message_Folder The folder object.

updateTimestamp() публичный Метод

Update the cache timestamp to the current time.
public updateTimestamp ( )

updateWindowSize() публичный Метод

Update the windowsize for the specified collection.
public updateWindowSize ( string $id, $windowsize )
$id string The collection id.

validateCache() публичный Метод

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.
public validateCache ( boolean $hb_only = false ) : boolean
$hb_only boolean If true, only validate the hb timestamps. @since 2.4.0
Результат boolean

validateCollectionsFromCache() публичный Метод

Validate the collections from the cache and fill in any missing values from the folder cache.
public validateCollectionsFromCache ( array &$collections )
$collections array A reference to an array of collections.

validateTimestamps() публичный Метод

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.
Устаревший: Not needed any longer. Remove in H6.
public validateTimestamps ( ) : boolean
Результат boolean

Описание свойств

$_data защищенное свойство

The cache data.
protected array $_data
Результат array

$_devid защищенное свойство

The device id
protected string $_devid
Результат string

$_dirty защищенное свойство

Track dirty properties.
protected array $_dirty
Результат array

$_logger защищенное свойство

Logger
protected Horde_Log_Logger $_logger
Результат Horde_Log_Logger

$_procid защищенное свойство

Process id for logging.
protected int $_procid
Результат integer

$_state защищенное свойство

The state driver
protected Horde_ActiveSync_State_Base $_state
Результат Horde_ActiveSync_State_Base

$_user защищенное свойство

The username
protected string $_user
Результат string