Property | Type | Description | |
---|---|---|---|
$_params | array | A hash containing any parameters for the current driver. |
Method | Description | |
---|---|---|
__construct ( array $params ) | Constructor. | |
deleteAlias ( array $info ) | Deletes alias records for a given user. | |
deleteDomain ( integer $domain_id ) | Deletes a domain and all the users and virtuals within it. | |
deleteForward ( array $info ) | Deletes forward records for a given user. | |
deleteUser ( integer $user_id ) | Deletes a user. | |
deleteVirtual ( integer $virtual_id ) | Deletes a virtual email. | |
factory ( string $driver = null, array $params = null ) : Vilma_Driver | Attempts to return a concrete Vilma_Driver instance based on $driver. | |
getAddressInfo ( string $address, string $type = 'all' ) : array | Returns an array of information related to the address passed in. | |
getAddresses ( string $domain, string $type = 'all', string $key = 'user_name', integer $direction ) : array | Returns a list of all users, aliases, or groups and forwards for a domain. | |
getAllUsers ( ) : array | Returns all the users sorted by domain and as arrays of each domain. | |
getDomain ( integer $domain_id ) : array | Returns the specified domain information from the backend. | |
getDomainAdmin ( string $domain_name ) : string | Returns the user who is the domain administrator. | |
getDomainByName ( $domain_name ) : array | Given a domain name returns the information from the backend. | |
getDomainMaxUsers ( string $domain_name ) : integer | Returns the maximum number of users allowed for a given domain. | |
getDomainNumUsers ( string $domain_name ) : integer | Returns the current number of users for a domain. | |
getDomainQuota ( string $domain_name ) : integer | Returns the configured quota for this 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. | |
getUserFormAttributes ( ) | ||
getUserStatus ( array $user ) : array | Does a series of checks for a given user to determine the status. | |
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. | |
isBelowMaxUsers ( string $domain ) : boolean | Checks if the given domain is below the maximum allowed users. | |
saveAlias ( array $info ) | Saves or creates alias records for a user. | |
saveDomain ( array $info ) | Saves a domain with the provided information. | |
saveForward ( array $info ) | Saves or creates forward records for a given user. | |
saveUser ( $info ) | ||
saveVirtual ( array $info, string $domain ) | Saves virtual email address to the backend. |
Method | Description | |
---|---|---|
_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. | |
_saveDomain ( array $info ) | Saves a domain with the provided information. | |
_saveUser ( array $info ) : string | Saves a user to the backend. |
public __construct ( array $params ) | ||
$params | array | Any parameters needed for this driver. |
abstract protected _deleteDomain ( integer $domain_id ) | ||
$domain_id | integer | The id of the domain to delete. |
abstract protected _saveDomain ( array $info ) | ||
$info | array | Array of details to save the domain. |
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. |
public deleteDomain ( integer $domain_id ) | ||
$domain_id | integer | The id of the domain to delete. |
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. |
abstract public deleteUser ( integer $user_id ) | ||
$user_id | integer | The id of the user to delete. |
public deleteVirtual ( integer $virtual_id ) | ||
$virtual_id | integer | The id of the virtual email to delete. |
public static factory ( string $driver = null, array $params = null ) : Vilma_Driver | ||
$driver | string | The type of concrete Vilma_Driver subclass to return. |
$params | array | A hash containing any additional configuration or connection parameters a subclass might need. |
return | Vilma_Driver | The newly created concrete Vilma_Driver instance. |
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'. |
return | array | Array of user information on success or empty array if the user does not exist. |
public getAddresses ( string $domain, string $type = 'all', string $key = 'user_name', integer $direction ) : array | ||
$domain | string | Domain on which to search. |
$type | string | Only return a specific type. One of 'all', 'user', 'alias', 'forward', or 'group'. |
$key | string | Sort list by this key. |
$direction | integer | Sort direction. |
return | array | Account information for this domain. |
public getAllUsers ( ) : array | ||
return | array | An array of domains then users for each domain. |
public getDomainAdmin ( string $domain_name ) : string | ||
$domain_name | string | The name of the domain for which to return the administrator. |
return | string | The domain administrator. |
abstract public getDomainByName ( $domain_name ) : array | ||
return | array | The domain's information in an array. |
public getDomainMaxUsers ( string $domain_name ) : integer | ||
$domain_name | string | The name of the domain for which to return the maximum users. |
return | integer | The maximum number of allowed users. |
abstract public getDomainNumUsers ( string $domain_name ) : integer | ||
$domain_name | string | The name of the domain for which to get the current number of users. |
return | integer | The current number of users. |
public getDomainQuota ( string $domain_name ) : integer | ||
$domain_name | string | The name of the domain for which to return the quota. |
return | integer | The domain quota. |
abstract public getDomains ( ) : array | ||
return | array | All the domains and their data in an array. |
public getUserStatus ( array $user ) : array | ||
$user | array | The user's details in an array as returned by the getUser() function. |
return | array | Either an array of error messages found during the checks or an array with a single element stating that the user is ready. |
public getVirtual ( integer $virtual_id ) : array | ||
$virtual_id | integer | The virtual id for which to return information. |
return | array | The virtual email information. |
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. |
return | array | The available virtual emails. |
public isBelowMaxUsers ( string $domain ) : boolean | ||
$domain | string | The domain name to check. |
return | boolean | True if the domain does not have a maximum limit (0) or current number of users is below the maximum number allowed. |
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. |
public saveDomain ( array $info ) | ||
$info | array | Array of details to save the domain. |
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. |
public saveVirtual ( array $info, string $domain ) | ||
$info | array | The virtual email data. |
$domain | string | The name of the domain for this virtual email. |
protected array $_params | ||
return | array |