PHP Класс Sam_Driver_Amavisd_Sql, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Автор: Max Kalika ([email protected])
Автор: Jan Schneider ([email protected])
Наследование: extends Sam_Driver_Base
Показать файл Открыть проект

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

Свойство Тип Описание
$_capabilities array List of the capabilities supported by this driver.
$_db Horde_Db_Adapter Handle for the current database connection.

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

Метод Описание
__construct ( string $user, array $params = [] ) Constructor.
booleanToOption ( boolean $boolean ) : mixed Converts a boolean option to a backend specific value.
retrieve ( ) Retrieves user preferences from the backend.
store ( boolean $defaults = false ) Stores user preferences and default values in the backend.

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

Метод Описание
_createUserID ( ) : string Creates an Amavisd-new recipient for policy, whitelist and blacklist storage and retrieval.
_lookupPolicyID ( ) : string | boolean Returns an Amavisd-new policy for storage and retrieval.
_lookupUserID ( ) : string Returns an Amavisd-new recipient for policy, whitelist and blacklist storage and retrieval.
_mapAttributeToField ( string $table, string $attribute ) : string Converts a Sam attribute from a specific table to a field that Amavisd-new will use.
_mapFieldToAttribute ( string $table, string $field ) : string Converts a Amavisd-new field from a specific table to a Sam attribute.
_mapNameToTable ( string $table ) : string Converts a Sam table name to a table name that Amavisd-new will use.

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

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

Constructor.
public __construct ( string $user, array $params = [] )
$user string A user name.
$params array Class parameters: - db: (Horde_Db_Adapater) A database handle. - table_map: (array) A map of table and field names. See config/backends.php.

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

Creates an Amavisd-new recipient for policy, whitelist and blacklist storage and retrieval.
protected _createUserID ( ) : string
Результат string The id of the newly created recipient.

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

Returns an Amavisd-new policy for storage and retrieval.
protected _lookupPolicyID ( ) : string | boolean
Результат string | boolean The results of the of the policy lookup. Can be the ID of the policy, false if not found.

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

Returns an Amavisd-new recipient for policy, whitelist and blacklist storage and retrieval.
protected _lookupUserID ( ) : string
Результат string The ID of the found or newly created recipient.

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

Converts a Sam attribute from a specific table to a field that Amavisd-new will use.
protected _mapAttributeToField ( string $table, string $attribute ) : string
$table string The Sam table to lookup.
$attribute string The Sam attribute to convert.
Результат string The converted Amavisd-new field or the original attribute if no match is found.

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

Converts a Amavisd-new field from a specific table to a Sam attribute.
protected _mapFieldToAttribute ( string $table, string $field ) : string
$table string The Sam table to lookup.
$field string The Amavisd-new field to convert.
Результат string The converted Sam attribute or the original field if no match is found.

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

Converts a Sam table name to a table name that Amavisd-new will use.
protected _mapNameToTable ( string $table ) : string
$table string The Sam table to lookup.
Результат string The converted Amavisd-new table or the original name if no match is found.

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

Converts a boolean option to a backend specific value.
public booleanToOption ( boolean $boolean ) : mixed
$boolean boolean The value to convert.
Результат mixed Y if true and N if false.

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

Retrieves user preferences from the backend.
public retrieve ( )

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

Stores user preferences and default values in the backend.
public store ( boolean $defaults = false )
$defaults boolean Whether to store the global defaults instead of user options. Unused.

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

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

List of the capabilities supported by this driver.
protected array $_capabilities
Результат array

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

Handle for the current database connection.
protected Horde_Db_Adapter $_db
Результат Horde_Db_Adapter