Horde_Kolab_Storage_Driver_Decorator_Log
extends Horde_Kolab_Storage_Driver_Decorator_Base
in package
A log decorator definition for the Kolab storage drivers.
Copyright 2010-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
Table of Contents
- $_driver : Horde_Kolab_Storage_Driver
- The decorated driver.
- $_logger : mixed
- A log handler.
- __construct() : mixed
- Constructor.
- 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.
- fetch() : array<string|int, mixed>
- Fetches the objects for the specified UIDs.
- 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() : 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 on a folder.
- getAuth() : string
- Return the id of the user currently authenticated.
- getBackend() : mixed
- Returns the actual backend driver.
- getDriverName() : string
- Return the class name of the decorated 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.
- getParser() : Horde_Kolab_Storage_Data_Parser
- Returns the parser for data objects.
- 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.
- 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 mailboxes.
- listFolders() : array<string|int, mixed>
- Retrieves a list of mailboxes 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.
- setParser() : null
- Set the data parser.
- status() : array<string|int, mixed>
- Returns the status of the current folder.
Properties
$_driver
The decorated driver.
private
Horde_Kolab_Storage_Driver
$_driver
$_logger
A log handler.
private
mixed
$_logger
Methods
__construct()
Constructor.
public
__construct(Horde_Kolab_Storage_Driver $driver, mixed $logger) : mixed
Parameters
- $driver : Horde_Kolab_Storage_Driver
-
The decorated driver.
- $logger : mixed
-
The log handler. This instance must provide the debug() method.
Return values
mixed —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 —fetch()
Fetches the objects for the specified UIDs.
public
fetch(string $folder, mixed $uids[, mixed $options = array() ]) : array<string|int, mixed>
Parameters
- $folder : string
-
The folder to access.
- $uids : mixed
- $options : mixed = array()
Return values
array<string|int, mixed> —The parsed objects.
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
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 —The body part, as a stream resource.
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 on a folder.
public
getAnnotation(string $entry, string $folder) : string
Parameters
- $entry : string
-
The entry to fetch.
- $folder : string
-
The name of the folder.
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.
getDriverName()
Return the class name of the decorated driver.
public
getDriverName() : string
Return values
string —The class name of the decorated 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.
getParser()
Returns the parser for data objects.
public
getParser() : Horde_Kolab_Storage_Data_Parser
Return values
Horde_Kolab_Storage_Data_Parser —The parser.
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.
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 mailboxes.
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 mailboxes from the server.
public
listFolders() : array<string|int, mixed>
Return values
array<string|int, mixed> —The list of mailboxes.
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 —setParser()
Set the data parser.
public
setParser(mixed $parser) : null
Parameters
- $parser : mixed
-
The parser 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'.