Documentation

Horde_Kolab_Storage_Driver_Base
in package
implements Horde_Kolab_Storage_Driver

The base driver definition for accessing Kolab storage drivers.

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

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

Interfaces, Classes, Traits and Enums

Horde_Kolab_Storage_Driver
The driver definition for accessing Kolab storage.

Table of Contents

$_namespace  : Horde_Kolab_Storage_Folder_Namespace
Memory cache for the namespace of this driver.
$charset  : string
Charset used by this driver.
$_backend  : mixed
The backend to use.
$_factory  : Horde_Kolab_Storage_Factory
Factory for generating helper objects.
$_params  : array<string|int, mixed>
Additional connection parameters.
__construct()  : mixed
Constructor.
fetchBodypart()  : resource
Retrieves a bodypart for the given message ID and mime part ID.
fetchComplete()  : array<string|int, mixed>
Retrieves a complete message.
fetchHeaders()  : Horde_Mime_Headers
Retrieves the message headers.
fetchStructure()  : Horde_Mime_Part
Retrieves the messages for the given message ids.
getAuth()  : string
Return the id of the user currently authenticated.
getBackend()  : mixed
Returns the actual backend driver.
getId()  : string
Return the unique connection id.
getModifiable()  : Horde_Kolab_Storage_Driver_Modifiable
Return a modifiable message object.
getNamespace()  : Horde_Kolab_Storage_Folder_Namespace
Retrieve the namespace information for this connection.
getParam()  : mixed
Return a parameter setting for this connection.
getParameters()  : array<string|int, mixed>
Return the connection parameters.
getParams()  : array<string|int, mixed>
Return all parameter settings for this connection.
getStamp()  : Horde_Kolab_Storage_Folder_Stamp
Returns a stamp for the current folder status. This stamp can be used to identify changes in the folder data.
getStampFromToken()  : Horde_Kolab_Storage_Folder_Stamp
Returns a stamp for the current folder status. This stamp can be used to identify changes in the folder data. This method, as opposed to self::getStamp(), uses the IMAP client's token to calculate the changes.
hasCatenateSupport()  : bool
Checks if the backend supports CATENATE.
setBackend()  : null
Set the backend driver.
setParam()  : null
Set a parameter setting for this connection.
_getAnnotateMoreEntry()  : array<string|int, mixed>
Split a name for the METADATA extension into the correct syntax for the older ANNOTATEMORE version.
decodeList()  : array<string|int, mixed>
Decode a list of IMAP path names from the driver charset to UTF-8.
decodeListKeys()  : array<string|int, mixed>
Decode the keys of a list of IMAP path names from the driver charset to UTF-8.
decodePath()  : string
Decode IMAP path names from the driver charset to UTF-8.
encodePath()  : string
Encode IMAP path names from UTF-8 to the driver charset.
getFactory()  : Horde_Kolab_Storage_Factory
Return the factory.

Properties

$charset

Charset used by this driver.

protected string $charset = 'UTF7-IMAP'

$_backend

The backend to use.

private mixed $_backend

$_params

Additional connection parameters.

private array<string|int, mixed> $_params

Methods

__construct()

Constructor.

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

A factory for helper objects.

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

Connection parameters.

Return values
mixed

fetchBodypart()

Retrieves a bodypart for the given message ID and mime part ID.

public fetchBodypart(string $mailbox, array<string|int, mixed> $uid, array<string|int, mixed> $id) : resource
Parameters
$mailbox : string

The mailbox to fetch the messages from.

$uid : array<string|int, mixed>

The message UID.

$id : array<string|int, mixed>

The mime part ID.

Return values
resource

The transfer-decoded body part data, as a stream resource presented as 8bit data.

fetchComplete()

Retrieves a complete message.

public fetchComplete(string $folder, array<string|int, mixed> $uid) : array<string|int, mixed>
Parameters
$folder : string

The folder to fetch the messages from.

$uid : array<string|int, mixed>

The message UID.

Return values
array<string|int, mixed>

The message encapsuled as an array that contains a Horde_Mime_Headers and a Horde_Mime_Part object.

fetchHeaders()

Retrieves the message headers.

public fetchHeaders(string $folder, array<string|int, mixed> $uid) : Horde_Mime_Headers
Parameters
$folder : string

The folder to fetch the message from.

$uid : array<string|int, mixed>

The message UID.

Return values
Horde_Mime_Headers

The message headers.

fetchStructure()

Retrieves the messages for the given message ids.

public fetchStructure(string $mailbox, array<string|int, mixed> $uids) : Horde_Mime_Part
Parameters
$mailbox : string

The mailbox to fetch the messages from.

$uids : array<string|int, mixed>

The message UIDs.

Return values
Horde_Mime_Part

The message structure parsed into a Horde_Mime_Part instance.

getAuth()

Return the id of the user currently authenticated.

public getAuth() : string
Return values
string

The id of the user that opened the IMAP connection.

getBackend()

Returns the actual backend driver.

public getBackend() : mixed

If there is no driver set the driver should be constructed within this method.

Return values
mixed

The backend driver.

getId()

Return the unique connection id.

public getId() : string
Return values
string

The connection id.

getModifiable()

Return a modifiable message object.

public getModifiable(string $folder, string $obid, array<string|int, mixed> $object) : Horde_Kolab_Storage_Driver_Modifiable
Parameters
$folder : string

The folder to access.

$obid : string

The backend ID of the object to retrieve from the folder.

$object : array<string|int, mixed>

The object data.

Return values
Horde_Kolab_Storage_Driver_Modifiable

The modifiable message object.

getParam()

Return a parameter setting for this connection.

public getParam(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string

The parameter key.

$default : mixed = null

An optional default value.

Return values
mixed

The parameter value.

getParameters()

Return the connection parameters.

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

The connection parameters.

getParams()

Return all parameter settings for this connection.

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

The parameters.

getStamp()

Returns a stamp for the current folder status. This stamp can be used to identify changes in the folder data.

public getStamp(string $folder) : Horde_Kolab_Storage_Folder_Stamp
Parameters
$folder : string

Return the stamp for this folder.

Return values
Horde_Kolab_Storage_Folder_Stamp

A stamp indicating the current folder status.

getStampFromToken()

Returns a stamp for the current folder status. This stamp can be used to identify changes in the folder data. This method, as opposed to self::getStamp(), uses the IMAP client's token to calculate the changes.

public getStampFromToken(string $folder, string $token, array<string|int, mixed> $ids) : Horde_Kolab_Storage_Folder_Stamp
Parameters
$folder : string

Return the stamp for this folder.

$token : string

A sync token provided by the IMAP server.

$ids : array<string|int, mixed>

An array of UIDs that we know about.

Return values
Horde_Kolab_Storage_Folder_Stamp

A stamp indicating the current folder status.

hasCatenateSupport()

Checks if the backend supports CATENATE.

public hasCatenateSupport() : bool
Return values
bool

True if the backend supports CATENATE.

setBackend()

Set the backend driver.

public setBackend(mixed $backend) : null
Parameters
$backend : mixed

The driver that should be used.

Return values
null

setParam()

Set a parameter setting for this connection.

public setParam(string $key, mixed $value) : null
Parameters
$key : string

The parameter key.

$value : mixed

The parameter value.

Return values
null

_getAnnotateMoreEntry()

Split a name for the METADATA extension into the correct syntax for the older ANNOTATEMORE version.

protected _getAnnotateMoreEntry(string $name) : array<string|int, mixed>
Parameters
$name : string

A name for a metadata entry.

Tags
throws
Horde_Imap_Client_Exception
Return values
array<string|int, mixed>

A list of two elements: The entry name and the value type.

decodeList()

Decode a list of IMAP path names from the driver charset to UTF-8.

protected decodeList(array<string|int, mixed> $list) : array<string|int, mixed>
Parameters
$list : array<string|int, mixed>

The the driver charset encoded path names.

Return values
array<string|int, mixed>

The path names in UTF-8.

decodeListKeys()

Decode the keys of a list of IMAP path names from the driver charset to UTF-8.

protected decodeListKeys(array<string|int, mixed> $list) : array<string|int, mixed>
Parameters
$list : array<string|int, mixed>

The list with the driver charset encoded path names as keys.

Return values
array<string|int, mixed>

The list with path names in UTF-8 as keys.

decodePath()

Decode IMAP path names from the driver charset to UTF-8.

protected decodePath(string $path) : string
Parameters
$path : string

The the driver charset encoded path name.

Return values
string

The path name in UTF-8.

encodePath()

Encode IMAP path names from UTF-8 to the driver charset.

protected encodePath(string $path) : string
Parameters
$path : string

The UTF-8 encoded path name.

Return values
string

The path name in the driver charset.

Search results