Documentation

Horde_Prefs_Storage_KolabImap extends Horde_Prefs_Storage_Base
in package

Preferences storage implementation for a Kolab IMAP server.

Tags
author

Gunnar Wrobel p@rdus.de

category

Horde

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$_folder  : string
Name of the preferences default folder
$_kolab  : Horde_Kolab_Storage
Handle for the current Kolab connection.
$_logger  : Horde_Log_Logger
Log handler.
$_params  : string
Configuration parameters.
__construct()  : mixed
Constructor.
get()  : Horde_Prefs_Scope
Retrieves the requested preferences scope from the storage backend.
getParams()  : array<string|int, mixed>
Get the list of driver parameters.
listScopes()  : array<string|int, mixed>
Lists all available scopes.
onChange()  : mixed
Called whenever a preference value is changed.
remove()  : mixed
Removes preferences from the backend.
store()  : mixed
Stores changed preferences in the storage backend.
_getStorage()  : Horde_Kolab_Storage_Data
Opens a connection to the Kolab server.
_arrayToPref()  : array<string|int, mixed>
Convert a key => value list of preferences to the Kolab preferences.
_logMissingScope()  : null
Log the missing scope.
_logMissingStorage()  : null
Log the missing backend.
_prefToArray()  : array<string|int, mixed>
Convert Kolab preferences data to an array.

Properties

$_folder

Name of the preferences default folder

protected string $_folder

$_kolab

Handle for the current Kolab connection.

protected Horde_Kolab_Storage $_kolab

$_logger

Log handler.

protected Horde_Log_Logger $_logger

$_params

Configuration parameters.

protected string $_params = array()

'user' is always available as an entry.

Methods

__construct()

Constructor.

public __construct(string $user[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$user : string

The username.

$params : array<string|int, mixed> = array()

Configuration parameters.

'kolab'  - (Horde_Kolab_Storage) [REQUIRED] The storage backend.
'folder' - (string) The default name of the preferences folder.
           DEFAULT: _('Preferences')
Tags
throws
InvalidArgumentException
Return values
mixed

getParams()

Get the list of driver parameters.

public getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

Driver parameters.

listScopes()

Lists all available scopes.

public listScopes() : array<string|int, mixed>
Return values
array<string|int, mixed>

The list of scopes stored in the backend.

onChange()

Called whenever a preference value is changed.

public onChange(string $scope, string $pref) : mixed
Parameters
$scope : string

Scope specifier.

$pref : string

The preference name.

Return values
mixed

remove()

Removes preferences from the backend.

public remove([string $scope = null ][, string $pref = null ]) : mixed
Parameters
$scope : string = null

The scope of the prefs to clear. If null, clears all scopes.

$pref : string = null

The pref to clear. If null, clears the entire scope.

Tags
throws
Horde_Prefs_Exception
Return values
mixed

_getStorage()

Opens a connection to the Kolab server.

protected _getStorage([bool $create_missing = false ]) : Horde_Kolab_Storage_Data
Parameters
$create_missing : bool = false

Create a preferences folder if it is missing.

Tags
throws
Horde_Prefs_Exception
Return values
Horde_Kolab_Storage_Data

The storage backend.

_arrayToPref()

Convert a key => value list of preferences to the Kolab preferences.

private _arrayToPref(array<string|int, mixed> $pref) : array<string|int, mixed>
Parameters
$pref : array<string|int, mixed>

The preferences.

Return values
array<string|int, mixed>

The preferences data as list.

_logMissingScope()

Log the missing scope.

private _logMissingScope(Exception $e, string $scope) : null
Parameters
$e : Exception

The exception that occurred.

$scope : string

The scope that was attempted to get.

Return values
null

_logMissingStorage()

Log the missing backend.

private _logMissingStorage(Exception $e) : null
Parameters
$e : Exception

The exception that occurred.

Return values
null

_prefToArray()

Convert Kolab preferences data to an array.

private _prefToArray(array<string|int, mixed> $pref) : array<string|int, mixed>
Parameters
$pref : array<string|int, mixed>

The preferences list.

Return values
array<string|int, mixed>

The preferences data as array.

Search results