PHP Класс Vilma_Driver_Qmailldap, 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.
Автор: Ben Klang ([email protected])
Автор: David Cummings ([email protected])
Наследование: extends Vilma_Driver_Sql
Показать файл Открыть проект

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

Свойство Тип Описание
$_fieldmap array Map of internal field names to LDAP attribute names.
$_ldap resource Reference to initialized LDAP driver.
$_users array Cache for retrieved getUsers() results.

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

Метод Описание
__construct ( array $params ) Constructor.
_connect ( )
deleteAlias ( array $info ) Deletes alias records for a given user.
deleteForward ( array $info ) Deletes forward records for a given user.
deleteUser ( integer $user_id ) Deletes a user.
getAddressInfo ( string $address, string $type = 'all' ) : array Returns an array of information related to the address passed in.
getDomainNumUsers ( string $domain_name ) : integer Returns the current number of users for a domain.
getUser ( integer $user_id ) : array Returns the user information for a given user id.
getUserFormAttributes ( )
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.
saveAlias ( array $info ) Saves or creates alias records for a user.
saveForward ( array $info ) Saves or creates forward records for a given user.

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

Метод Описание
_createUser ( array $info ) : array Creates a user in 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.
_getAliases ( string $target = null ) : array Returns available email address aliases.
_getGroupsAndForwards ( string $acquire = null, string $domain = null ) : array Returns all available groups and forwards unless otherwise specified.
_saveUser ( array $info ) : array Saves a user to the backend.
_searchForUser ( string $email_id ) : array Searchs for a given email account.
_updateUser ( array $info ) : array Updates a user in the backend.

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

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

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

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

public _connect ( )

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

Creates a user in the backend.
protected _createUser ( array $info ) : array
$info array The user information to save.
Результат array The user information.

_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

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

Returns available email address aliases.
protected _getAliases ( string $target = null ) : array
$target string If passed a domain then return all alias emails for the domain, otherwise if passed a user name return all virtual emails for that user.
Результат array The used email aliases.

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

If a domain name is passed then limit the results to groups or forwards in that domain.
protected _getGroupsAndForwards ( string $acquire = null, string $domain = null ) : array
$acquire string The default behavior is to acquire both groups and forwards; a value of 'group' will return only groups and a value of 'forward' will return only forwards.
$domain string The name of the domain from which to fetch.
Результат array The available groups and forwards with details.

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

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

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

Searchs for a given email account.
protected _searchForUser ( string $email_id ) : array
$email_id string The id of the account to be searched for.
Результат array Data for given email account on success or no information found.

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

Updates a user in the backend.
protected _updateUser ( array $info ) : array
$info array The user information to save.
Результат array The user information.

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

Deletes alias records for a given user.
public deleteAlias ( array $info )
$info array The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'alias': The alias we are deleting.

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

Deletes forward records for a given user.
public deleteForward ( array $info )
$info array The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'forward': The forward we are deleting.

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

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

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

Returns an array of information related to the address passed in.
public getAddressInfo ( string $address, string $type = 'all' ) : array
$address string Address for which information will be pulled.
$type string Address type to request. One of 'all', 'user', 'alias', 'forward' or 'group'.
Результат array Array of user information on success or empty array if the user does not exist.

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.

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.

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

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.

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

Saves or creates alias records for a user.
public saveAlias ( array $info )
$info array The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'alias_address': The alias to create or the new data for the modified entry. - 'alias': The alias we are modifying, if we are modifying an existing one.

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

Saves or creates forward records for a given user.
public saveForward ( array $info )
$info array The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'forward_address': The forward to create or the new data for the modified entry. - 'forward': The forward we are modifying, if we are modifying an existing one.

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

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

Map of internal field names to LDAP attribute names.
protected array $_fieldmap
Результат array

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

Reference to initialized LDAP driver.
protected resource $_ldap
Результат resource

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

Cache for retrieved getUsers() results.
protected array $_users
Результат array