Documentation

Horde_Kolab_Storage_Driver

The driver definition for accessing Kolab storage.

Copyright 2004-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

Table of Contents

appendMessage()  : mixed
Appends a message to the given folder.
create()  : null
Create the specified folder.
createBackend()  : mixed
Create the backend driver.
delete()  : null
Delete the specified folder.
deleteAcl()  : null
Delete the access rights for user on a folder.
deleteMessages()  : null
Deletes messages from the specified folder.
expunge()  : null
Expunges messages in the current folder.
fetchBodypart()  : resource|string
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()  : array<string|int, mixed>
Retrieves the messages for the given message ids.
getAcl()  : array<string|int, mixed>
Retrieve the access rights for a folder.
getAnnotation()  : string
Fetches the annotation from a folder.
getAuth()  : string
Return the id of the user currently authenticated.
getBackend()  : mixed
Returns the actual backend driver.
getId()  : string
Return the unique connection id.
getMyAcl()  : string
Retrieve the access rights the current user has on a folder.
getNamespace()  : Horde_Kolab_Storage_Driver_Namespace
Retrieve the namespace information for this connection.
getParameters()  : array<string|int, mixed>
Return the connection parameters.
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.
getUids()  : array<string|int, mixed>
Returns the message ids of the messages in this folder.
hasAclSupport()  : bool
Does the backend support ACL?
hasCatenateSupport()  : bool
Checks if the backend supports CATENATE.
listAnnotation()  : array<string|int, mixed>
Retrieves the specified annotation for the complete list of folders.
listFolders()  : array<string|int, mixed>
Retrieves a list of folders from the server.
moveMessage()  : null
Moves a message to a new folder.
rename()  : null
Rename the specified folder.
setAcl()  : null
Set the access rights for a folder.
setAnnotation()  : null
Sets the annotation on a folder.
setBackend()  : null
Set the backend driver.
status()  : array<string|int, mixed>
Returns the status of the current folder.

Methods

appendMessage()

Appends a message to the given folder.

public appendMessage(string $folder, resource $msg) : mixed
Parameters
$folder : string

The folder to append the message(s) to.

$msg : resource

The message to append.

Return values
mixed

True or the UID of the new message in case the backend supports UIDPLUS.

create()

Create the specified folder.

public create(string $folder) : null
Parameters
$folder : string

The folder to create.

Return values
null

createBackend()

Create the backend driver.

public createBackend() : mixed
Return values
mixed

The backend driver.

delete()

Delete the specified folder.

public delete(string $folder) : null
Parameters
$folder : string

The folder to delete.

Return values
null

deleteAcl()

Delete the access rights for user on a folder.

public deleteAcl(string $folder, string $user) : null
Parameters
$folder : string

The folder to act upon.

$user : string

The user to delete the ACL for

Return values
null

deleteMessages()

Deletes messages from the specified folder.

public deleteMessages(string $folder, int $uids) : null
Parameters
$folder : string

The folder to delete messages from.

$uids : int

IMAP message ids.

Return values
null

expunge()

Expunges messages in the current folder.

public expunge(string $folder) : null
Parameters
$folder : string

The folder to expunge.

Return values
null

fetchBodypart()

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

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

The folder 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|string

The body part, as a stream resource or string.

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 $folder, array<string|int, mixed> $uids) : array<string|int, mixed>
Parameters
$folder : string

The folder to fetch the messages from.

$uids : array<string|int, mixed>

The message UIDs.

Return values
array<string|int, mixed>

An array of message structures parsed into Horde_Mime_Part instances.

getAcl()

Retrieve the access rights for a folder.

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

The folder to retrieve the ACL for.

Return values
array<string|int, mixed>

An array of rights.

getAnnotation()

Fetches the annotation from a folder.

public getAnnotation(string $folder, string $annotation) : string
Parameters
$folder : string

The name of the folder.

$annotation : string

The annotation to get.

Return values
string

The annotation value.

getAuth()

Return the id of the user currently authenticated.

public getAuth() : string
Return values
string

The id of the user that opened the 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.

getMyAcl()

Retrieve the access rights the current user has on a folder.

public getMyAcl(string $folder) : string
Parameters
$folder : string

The folder to retrieve the user ACL for.

Return values
string

The user rights.

getNamespace()

Retrieve the namespace information for this connection.

public getNamespace() : Horde_Kolab_Storage_Driver_Namespace
Return values
Horde_Kolab_Storage_Driver_Namespace

The initialized namespace handler.

getParameters()

Return the connection parameters.

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

The connection parameters.

getUids()

Returns the message ids of the messages in this folder.

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

Check the status of this folder.

Return values
array<string|int, mixed>

The message ids.

hasAclSupport()

Does the backend support ACL?

public hasAclSupport() : bool
Return values
bool

True if the backend supports ACLs.

hasCatenateSupport()

Checks if the backend supports CATENATE.

public hasCatenateSupport() : bool
Return values
bool

True if the backend supports CATENATE.

listAnnotation()

Retrieves the specified annotation for the complete list of folders.

public listAnnotation(string $annotation) : array<string|int, mixed>
Parameters
$annotation : string

The name of the annotation to retrieve.

Return values
array<string|int, mixed>

An associative array combining the folder names as key with the corresponding annotation value.

listFolders()

Retrieves a list of folders from the server.

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

The list of folders.

moveMessage()

Moves a message to a new folder.

public moveMessage(int $uid, string $old_folder, string $new_folder) : null
Parameters
$uid : int

IMAP message id.

$old_folder : string

Source folder.

$new_folder : string

Target folder.

Return values
null

rename()

Rename the specified folder.

public rename(string $old, string $new) : null
Parameters
$old : string

The folder to rename.

$new : string

The new name of the folder.

Return values
null

setAcl()

Set the access rights for a folder.

public setAcl(string $folder, string $user, string $acl) : null
Parameters
$folder : string

The folder to act upon.

$user : string

The user to set the ACL for.

$acl : string

The ACL.

Return values
null

setAnnotation()

Sets the annotation on a folder.

public setAnnotation(string $folder, string $annotation, array<string|int, mixed> $value) : null
Parameters
$folder : string

The name of the folder.

$annotation : string

The annotation to set.

$value : array<string|int, mixed>

The values to set

Return values
null

setBackend()

Set the backend driver.

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

The driver that should be used.

Return values
null

status()

Returns the status of the current folder.

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

Check the status of this folder.

Return values
array<string|int, mixed>

An array that contains 'uidvalidity' and 'uidnext'.

Search results