PHP Class Horde_Kolab_Storage_Driver_Base, horde

Copyright 2009-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.
Inheritance: implements Horde_Kolab_Storage_Driver
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_namespace Horde_Kolab_Storage_Folder_Namespace Memory cache for the namespace of this driver.
$charset string Charset used by this driver.

Méthodes publiques

Méthode Description
__construct ( Horde_Kolab_Storage_Factory $factory, array $params = [] ) Constructor.
fetchBodypart ( string $mailbox, array $uid, array $id ) : resource Retrieves a bodypart for the given message ID and mime part ID.
fetchComplete ( string $folder, array $uid ) : array Retrieves a complete message.
fetchHeaders ( string $folder, array $uid ) : Horde_Mime_Headers Retrieves the message headers.
fetchStructure ( string $mailbox, array $uids ) : 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 ( string $folder, string $obid, array $object ) : Horde_Kolab_Storage_Driver_Modifiable Return a modifiable message object.
getNamespace ( ) : Horde_Kolab_Storage_Folder_Namespace Retrieve the namespace information for this connection.
getParam ( string $key, mixed $default = null ) : mixed Return a parameter setting for this connection.
getParameters ( ) : array Return the connection parameters.
getParams ( ) : array Return all parameter settings for this connection.
getStamp ( string $folder ) : 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 ( string $folder, string $token, array $ids ) : 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 ( ) : boolean Checks if the backend supports CATENATE.
setBackend ( mixed $backend ) : null Set the backend driver.
setParam ( string $key, mixed $value ) : null Set a parameter setting for this connection.

Méthodes protégées

Méthode Description
_getAnnotateMoreEntry ( string $name ) : array Split a name for the METADATA extension into the correct syntax for the older ANNOTATEMORE version.
decodeList ( array $list ) : array Decode a list of IMAP path names from the driver charset to UTF-8.
decodeListKeys ( array $list ) : array Decode the keys of a list of IMAP path names from the driver charset to UTF-8.
decodePath ( string $path ) : string Decode IMAP path names from the driver charset to UTF-8.
encodePath ( string $path ) : string Encode IMAP path names from UTF-8 to the driver charset.
getFactory ( ) : Horde_Kolab_Storage_Factory Return the factory.

Method Details

__construct() public méthode

Constructor.
public __construct ( Horde_Kolab_Storage_Factory $factory, array $params = [] )
$factory Horde_Kolab_Storage_Factory A factory for helper objects.
$params array Connection parameters.

_getAnnotateMoreEntry() protected méthode

Split a name for the METADATA extension into the correct syntax for the older ANNOTATEMORE version.
protected _getAnnotateMoreEntry ( string $name ) : array
$name string A name for a metadata entry.
Résultat array A list of two elements: The entry name and the value type.

decodeList() protected méthode

Decode a list of IMAP path names from the driver charset to UTF-8.
protected decodeList ( array $list ) : array
$list array The the driver charset encoded path names.
Résultat array The path names in UTF-8.

decodeListKeys() protected méthode

Decode the keys of a list of IMAP path names from the driver charset to UTF-8.
protected decodeListKeys ( array $list ) : array
$list array The list with the driver charset encoded path names as keys.
Résultat array The list with path names in UTF-8 as keys.

decodePath() protected méthode

Decode IMAP path names from the driver charset to UTF-8.
protected decodePath ( string $path ) : string
$path string The the driver charset encoded path name.
Résultat string The path name in UTF-8.

encodePath() protected méthode

Encode IMAP path names from UTF-8 to the driver charset.
protected encodePath ( string $path ) : string
$path string The UTF-8 encoded path name.
Résultat string The path name in the driver charset.

fetchBodypart() public méthode

Retrieves a bodypart for the given message ID and mime part ID.
public fetchBodypart ( string $mailbox, array $uid, array $id ) : resource
$mailbox string The mailbox to fetch the messages from.
$uid array The message UID.
$id array The mime part ID.
Résultat resource The transfer-decoded body part data, as a stream resource presented as 8bit data.

fetchComplete() public méthode

Retrieves a complete message.
public fetchComplete ( string $folder, array $uid ) : array
$folder string The folder to fetch the messages from.
$uid array The message UID.
Résultat array The message encapsuled as an array that contains a Horde_Mime_Headers and a Horde_Mime_Part object.

fetchHeaders() public méthode

Retrieves the message headers.
public fetchHeaders ( string $folder, array $uid ) : Horde_Mime_Headers
$folder string The folder to fetch the message from.
$uid array The message UID.
Résultat Horde_Mime_Headers The message headers.

fetchStructure() public méthode

Retrieves the messages for the given message ids.
public fetchStructure ( string $mailbox, array $uids ) : Horde_Mime_Part
$mailbox string The mailbox to fetch the messages from.
$uids array The message UIDs.
Résultat Horde_Mime_Part The message structure parsed into a Horde_Mime_Part instance.

getAuth() public méthode

Return the id of the user currently authenticated.
public getAuth ( ) : string
Résultat string The id of the user that opened the IMAP connection.

getBackend() public méthode

If there is no driver set the driver should be constructed within this method.
public getBackend ( ) : mixed
Résultat mixed The backend driver.

getFactory() protected méthode

Return the factory.
protected getFactory ( ) : Horde_Kolab_Storage_Factory
Résultat Horde_Kolab_Storage_Factory The factory.

getId() public méthode

Return the unique connection id.
public getId ( ) : string
Résultat string The connection id.

getModifiable() public méthode

Return a modifiable message object.
public getModifiable ( string $folder, string $obid, array $object ) : Horde_Kolab_Storage_Driver_Modifiable
$folder string The folder to access.
$obid string The backend ID of the object to retrieve from the folder.
$object array The object data.
Résultat Horde_Kolab_Storage_Driver_Modifiable The modifiable message object.

getNamespace() public méthode

Retrieve the namespace information for this connection.
public getNamespace ( ) : Horde_Kolab_Storage_Folder_Namespace
Résultat Horde_Kolab_Storage_Folder_Namespace The initialized namespace handler.

getParam() public méthode

Return a parameter setting for this connection.
public getParam ( string $key, mixed $default = null ) : mixed
$key string The parameter key.
$default mixed An optional default value.
Résultat mixed The parameter value.

getParameters() public méthode

Return the connection parameters.
public getParameters ( ) : array
Résultat array The connection parameters.

getParams() public méthode

Return all parameter settings for this connection.
public getParams ( ) : array
Résultat array The parameters.

getStamp() public méthode

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
$folder string Return the stamp for this folder.
Résultat Horde_Kolab_Storage_Folder_Stamp A stamp indicating the current folder status.

getStampFromToken() public méthode

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 $ids ) : Horde_Kolab_Storage_Folder_Stamp
$folder string Return the stamp for this folder.
$token string A sync token provided by the IMAP server.
$ids array An array of UIDs that we know about.
Résultat Horde_Kolab_Storage_Folder_Stamp A stamp indicating the current folder status.

hasCatenateSupport() public méthode

Checks if the backend supports CATENATE.
public hasCatenateSupport ( ) : boolean
Résultat boolean True if the backend supports CATENATE.

setBackend() public méthode

Set the backend driver.
public setBackend ( mixed $backend ) : null
$backend mixed The driver that should be used.
Résultat null

setParam() public méthode

Set a parameter setting for this connection.
public setParam ( string $key, mixed $value ) : null
$key string The parameter key.
$value mixed The parameter value.
Résultat null

Property Details

$_namespace protected_oe property

Memory cache for the namespace of this driver.
protected Horde_Kolab_Storage_Folder_Namespace $_namespace
Résultat Horde_Kolab_Storage_Folder_Namespace

$charset protected_oe property

Charset used by this driver.
protected string $charset
Résultat string