PHP Class 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.
Author: Ben Klang ([email protected])
Author: David Cummings ([email protected])
Inheritance: extends Vilma_Driver_Sql
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
_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.

Method Details

__construct() public méthode

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

_connect() public méthode

public _connect ( )

_createUser() protected méthode

Creates a user in the backend.
protected _createUser ( array $info ) : array
$info array The user information to save.
Résultat array The user information.

_deleteDomain() protected méthode

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

_getAddresses() protected méthode

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'.
Résultat array Account information for this domain

_getAliases() protected méthode

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.
Résultat array The used email aliases.

_getGroupsAndForwards() protected méthode

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.
Résultat array The available groups and forwards with details.

_saveUser() protected méthode

Saves a user to the backend.
protected _saveUser ( array $info ) : array
$info array The user information to save.
Résultat array The user information.

_searchForUser() protected méthode

Searchs for a given email account.
protected _searchForUser ( string $email_id ) : array
$email_id string The id of the account to be searched for.
Résultat array Data for given email account on success or no information found.

_updateUser() protected méthode

Updates a user in the backend.
protected _updateUser ( array $info ) : array
$info array The user information to save.
Résultat array The user information.

deleteAlias() public méthode

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() public méthode

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() public méthode

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

getAddressInfo() public méthode

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'.
Résultat array Array of user information on success or empty array if the user does not exist.

getDomainNumUsers() public méthode

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.
Résultat integer The current number of users.

getUser() public méthode

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.
Résultat array The user information.

getUserFormAttributes() public méthode

getUsers() public méthode

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.
Résultat array The available users and their stored information.

saveAlias() public méthode

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() public méthode

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.

Property Details

$_fieldmap protected_oe property

Map of internal field names to LDAP attribute names.
protected array $_fieldmap
Résultat array

$_ldap protected_oe property

Reference to initialized LDAP driver.
protected resource $_ldap
Résultat resource

$_users protected_oe property

Cache for retrieved getUsers() results.
protected array $_users
Résultat array