PHP 클래스 Horde_ActiveSync_SyncCache, horde

저자: Michael J Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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