PHP Класс Vilma_Driver_Sql, horde

See the enclosed file LICENSE for license information (BSD). If you did did not receive this file, see http://www.horde.org/licenses/bsd.
Автор: Marko Djukic ([email protected])
Наследование: extends Vilma_Driver
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_db Horde_Db

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

Метод Описание
__construct ( array $params ) Constructor.
deleteUser ( integer $user_id ) Deletes a user.
deleteVirtual ( integer $virtual_id ) Deletes a virtual email.
getDomain ( integer $domain_id ) : array Returns the specified domain information from the backend.
getDomainByName ( $domain_name ) : array Given a domain name returns the information from the backend.
getDomainNumUsers ( string $domain_name ) : integer Returns the current number of users for a domain.
getDomains ( ) : array Returns the list of domains from the backend.
getUser ( integer $user_id ) : array Returns the user information for a given user id.
getUsers ( string $domain = null ) : array Returns all available users, if a domain name is passed then limit the list of users only to those users.
getVirtual ( integer $virtual_id ) : array Returns information for a virtual id.
getVirtuals ( string $filter ) : array Returns available virtual emails.
saveVirtual ( array $info, string $domain ) Saves virtual email address to the backend.

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

Метод Описание
_deleteDomain ( integer $domain_id ) Deletes a domain.
_getAddresses ( string $domain, string $type = 'all' ) : array Returns a list of all users, aliases, or groups and forwards for a domain.
_getTableField ( $table, $field ) : string Returns the real name of a field from a specific table for SQL statements.
_getTableFields ( $table ) : string Returns the list of fields from a specific table for SQL statements.
_initialize ( ) Initializes this backend, connects to the SQL database.
_prepareRecord ( $table, $record ) : array
_saveDomain ( array $info ) Saves a domain with the provided information.
_saveUser ( array $info ) : string Saves a user to the backend.

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

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

Constructor.
public __construct ( array $params )
$params array Any parameters needed for this driver.

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

Deletes a domain.
protected _deleteDomain ( integer $domain_id )
$domain_id integer The id of the domain to delete.

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

Returns a list of all users, aliases, or groups and forwards for a domain.
protected _getAddresses ( string $domain, string $type = 'all' ) : array
$domain string Domain on which to search.
$type string Only return a specific type. One of 'all', 'user', 'alias','forward', or 'group'.
Результат array Account information for this domain

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

Returns the real name of a field from a specific table for SQL statements.
protected _getTableField ( $table, $field ) : string
Результат string

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

Returns the list of fields from a specific table for SQL statements.
protected _getTableFields ( $table ) : string
Результат string

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

Initializes this backend, connects to the SQL database.
protected _initialize ( )

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

protected _prepareRecord ( $table, $record ) : array
Результат array

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

Saves a domain with the provided information.
protected _saveDomain ( array $info )
$info array Array of details to save the domain.

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

Saves a user to the backend.
protected _saveUser ( array $info ) : string
$info array The user information to save.
Результат string The user ID.

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

Deletes a user.
public deleteUser ( integer $user_id )
$user_id integer The id of the user to delete.

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

Deletes a virtual email.
public deleteVirtual ( integer $virtual_id )
$virtual_id integer The id of the virtual email to delete.

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

Returns the specified domain information from the backend.
public getDomain ( integer $domain_id ) : array
$domain_id integer The id of the domain to fetch.
Результат array The domain's information in an array.

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

Given a domain name returns the information from the backend.
public getDomainByName ( $domain_name ) : array
Результат array The domain's information in an array.

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

Returns the current number of users for a domain.
public getDomainNumUsers ( string $domain_name ) : integer
$domain_name string The name of the domain for which to get the current number of users.
Результат integer The current number of users.

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

Returns the list of domains from the backend.
public getDomains ( ) : array
Результат array All the domains and their data in an array.

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

Returns the user information for a given user id.
public getUser ( integer $user_id ) : array
$user_id integer The id of the user for which to fetch information.
Результат array The user information.

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

Returns all available users, if a domain name is passed then limit the list of users only to those users.
public getUsers ( string $domain = null ) : array
$domain string The name of the domain for which to fetch the users.
Результат array The available users and their stored information.

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

Returns information for a virtual id.
public getVirtual ( integer $virtual_id ) : array
$virtual_id integer The virtual id for which to return information.
Результат array The virtual email information.

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

Returns available virtual emails.
public getVirtuals ( string $filter ) : array
$filter string If passed a domain then return all virtual emails for the domain, otherwise if passed a user name return all virtual emails for that user.
Результат array The available virtual emails.

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

Saves virtual email address to the backend.
public saveVirtual ( array $info, string $domain )
$info array The virtual email data.
$domain string The name of the domain for this virtual email.

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

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

protected Horde_Db $_db
Результат Horde_Db