PHP Класс 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.
Автор: Gunnar Wrobel ([email protected])
Наследование: implements Horde_Kolab_Storage_Driver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_namespace Horde_Kolab_Storage_Folder_Namespace Memory cache for the namespace of this driver.
$charset string Charset used by this driver.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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() защищенный Метод

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.
Результат array 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 $list ) : array
$list array The the driver charset encoded path names.
Результат array 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 $list ) : array
$list array The list with the driver charset encoded path names as keys.
Результат array 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
$path string The the driver charset encoded path name.
Результат string The path name in UTF-8.

encodePath() защищенный Метод

Encode IMAP path names from UTF-8 to the driver charset.
protected encodePath ( string $path ) : string
$path string The UTF-8 encoded path name.
Результат string The path name in the driver charset.

fetchBodypart() публичный Метод

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.
Результат 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 $uid ) : array
$folder string The folder to fetch the messages from.
$uid array The message UID.
Результат array 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 $uid ) : Horde_Mime_Headers
$folder string The folder to fetch the message from.
$uid array The message UID.
Результат Horde_Mime_Headers The message headers.

fetchStructure() публичный Метод

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.
Результат 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
Результат string The id of the user that opened the IMAP connection.

getBackend() публичный Метод

If there is no driver set the driver should be constructed within this method.
public getBackend ( ) : mixed
Результат mixed The backend driver.

getFactory() защищенный Метод

Return the factory.
protected getFactory ( ) : Horde_Kolab_Storage_Factory
Результат Horde_Kolab_Storage_Factory The factory.

getId() публичный Метод

Return the unique connection id.
public getId ( ) : string
Результат string The connection id.

getModifiable() публичный Метод

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.
Результат Horde_Kolab_Storage_Driver_Modifiable The modifiable message object.

getNamespace() публичный Метод

Retrieve the namespace information for this connection.
public getNamespace ( ) : Horde_Kolab_Storage_Folder_Namespace
Результат Horde_Kolab_Storage_Folder_Namespace The initialized namespace handler.

getParam() публичный Метод

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.
Результат mixed The parameter value.

getParameters() публичный Метод

Return the connection parameters.
public getParameters ( ) : array
Результат array The connection parameters.

getParams() публичный Метод

Return all parameter settings for this connection.
public getParams ( ) : array
Результат array 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
$folder string Return the stamp for this folder.
Результат 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 $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.
Результат Horde_Kolab_Storage_Folder_Stamp A stamp indicating the current folder status.

hasCatenateSupport() публичный Метод

Checks if the backend supports CATENATE.
public hasCatenateSupport ( ) : boolean
Результат boolean True if the backend supports CATENATE.

setBackend() публичный Метод

Set the backend driver.
public setBackend ( mixed $backend ) : null
$backend mixed The driver that should be used.
Результат null

setParam() публичный Метод

Set a parameter setting for this connection.
public setParam ( string $key, mixed $value ) : null
$key string The parameter key.
$value mixed The parameter value.
Результат null

Описание свойств

$_namespace защищенное свойство

Memory cache for the namespace of this driver.
protected Horde_Kolab_Storage_Folder_Namespace $_namespace
Результат Horde_Kolab_Storage_Folder_Namespace

$charset защищенное свойство

Charset used by this driver.
protected string $charset
Результат string