PHP Class Horde_Kolab_Storage_List_Cache, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
显示文件 Open project: horde/horde Class Usage Examples

Public Methods

Method Description
__construct ( Horde_Kolab_Storage_Cache $cache, array $parameters = [] ) Constructor.
getFolderTypes ( ) : array Returns the folder type annotation from the cache.
getFolders ( ) : array Returns the list of folders from the cache.
getListId ( ) : string Return the ID for the list cache.
getLongTerm ( string $key ) : mixed Return long term information.
getNamespace ( ) : mixed Return namespace information.
getQuery ( string $key ) : mixed Return query information.
getStamp ( ) : string Returns the last sync stamp.
hasFolderTypes ( ) : boolean Returns if the folder type annotation is stored in the cache.
hasLongTerm ( string $key ) : boolean Is the specified long term data available in the cache?
hasNamespace ( ) : boolean Returns if the namespace information is available.
hasQuery ( string $key ) : boolean Is the specified query data available in the cache?
hasSupport ( string $capability ) : boolean Has the list support for the requested capability?
isInitialized ( ) : boolean Check if the cache has been initialized.
issetSupport ( $capability ) : boolean Has the capability support already been cached?
save ( ) : null Cache the list data.
setLongTerm ( string $key, mixed $data ) : null Set long term information.
setNamespace ( mixed $data ) : null Set namespace information.
setQuery ( string $key, mixed $data ) : null Set query information.
setSupport ( string $capability, boolean $flag ) : null Set if the list supports the given capability.
store ( array $folders = null, array $types = null ) : null Store the folder list and folder type annotations in the cache.

Private Methods

Method Description
_load ( ) : mixed Retrieve the cached list data.
_setListId ( ) Compose the list key.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Kolab_Storage_Cache $cache, array $parameters = [] )
$cache Horde_Kolab_Storage_Cache The core cache driver.
$parameters array Connection parameters that are only recorded and have no further impact.

getFolderTypes() public method

Returns the folder type annotation from the cache.
public getFolderTypes ( ) : array
return array The list folder types with the folder names as key and the folder type as values.

getFolders() public method

Returns the list of folders from the cache.
public getFolders ( ) : array
return array The list of folders, represented as a list of strings.

getListId() public method

Return the ID for the list cache.
public getListId ( ) : string
return string The unique ID for the list used when caching it.

getLongTerm() public method

Return long term information.
public getLongTerm ( string $key ) : mixed
$key string The long term key.
return mixed The long term data.

getNamespace() public method

Return namespace information.
public getNamespace ( ) : mixed
return mixed The namespace data.

getQuery() public method

Return query information.
public getQuery ( string $key ) : mixed
$key string The query key.
return mixed The query data.

getStamp() public method

Returns the last sync stamp.
public getStamp ( ) : string
return string The last sync stamp.

hasFolderTypes() public method

Returns if the folder type annotation is stored in the cache.
public hasFolderTypes ( ) : boolean
return boolean True if the type annotation is available.

hasLongTerm() public method

Is the specified long term data available in the cache?
public hasLongTerm ( string $key ) : boolean
$key string The long term key.
return boolean True in case cached data is available.

hasNamespace() public method

Returns if the namespace information is available.
public hasNamespace ( ) : boolean
return boolean True if the information exists in the cache.

hasQuery() public method

Is the specified query data available in the cache?
public hasQuery ( string $key ) : boolean
$key string The query key.
return boolean True in case cached data is available.

hasSupport() public method

Has the list support for the requested capability?
public hasSupport ( string $capability ) : boolean
$capability string The name of the requested capability.
return boolean True if the backend supports the requested capability.

isInitialized() public method

Check if the cache has been initialized.
public isInitialized ( ) : boolean
return boolean True if cache data is available.

issetSupport() public method

Has the capability support already been cached?
public issetSupport ( $capability ) : boolean
return boolean True if the value is already in the cache.

save() public method

Cache the list data.
public save ( ) : null
return null

setLongTerm() public method

Set long term information.
public setLongTerm ( string $key, mixed $data ) : null
$key string The long term key.
$data mixed The long term data.
return null

setNamespace() public method

Set namespace information.
public setNamespace ( mixed $data ) : null
$data mixed The namespace data.
return null

setQuery() public method

Set query information.
public setQuery ( string $key, mixed $data ) : null
$key string The query key.
$data mixed The query data.
return null

setSupport() public method

Set if the list supports the given capability.
public setSupport ( string $capability, boolean $flag ) : null
$capability string The name of the requested capability.
$flag boolean True if the capability is supported.
return null

store() public method

Store the folder list and folder type annotations in the cache.
public store ( array $folders = null, array $types = null ) : null
$folders array
$types array
return null