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
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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