PHP Класс IMP_Prefs_Identity, horde

Автор: Jan Schneider ([email protected])
Автор: Chuck Hagenbuch ([email protected])
Наследование: extends Horde_Core_Prefs_Identity
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_cached array Cached data.
$_impPrefs array Identity preferences added by IMP.

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

Метод Описание
__construct ( $params ) Reads all the user's identities from the prefs object or builds a new identity from the standard values given in prefs.php.
getAliasAddress ( integer $ident = null ) : Horde_Mail_Rfc822_List Returns all aliases based on the chosen identity.
getAllFromAddresses ( ) : Horde_Mail_Rfc822_List Returns all identities' From addresses.
getAllIdentityAddresses ( ) : Horde_Mail_Rfc822_List Returns a list of all e-mail addresses from all identities, including both from addresses and tie addreses.
getAllSentmail ( boolean $unique = true ) : array Returns an array with the sent-mail mailboxes from all identities.
getAllSignatures ( string $type = 'text' ) : array Returns an array with the signatures from all identities
getAllTieAddresses ( ) : Horde_Mail_Rfc822_List Get all 'tie to' address/identity pairs.
getBccAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List Returns the BCC addresses for a given identity.
getFromAddress ( integer $ident = null ) : Horde_Mail_Rfc822_Address Returns the from address based on the chosen identity. If no address can be found it is built from the current user name and the specified maildomain.
getFromAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List Returns all From addresses for one identity.
getFromLine ( integer $ident = null, string $from_address = '' ) : Horde_Mail_Rfc822_Address Returns a complete From: header based on all relevant factors (fullname, from address, input fields, locks etc.)
getFullname ( integer $ident = null ) : string Returns the user's full name.
getMatchingIdentity ( mixed $addresses, boolean $search_own = true ) : integer Returns the identity's id that matches the passed addresses.
getSelectList ( ) : array Returns an array with the necessary values for the identity select box in the IMP compose window.
getSignature ( string $type = 'text', integer $ident = null ) : string Returns the full signature based on the current settings for the signature itself, the dashes and the position.
getTieAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List Get tie-to addresses.
getValue ( $key, $identity = null ) Returns a property from one of the identities.
hasAddress ( mixed $address ) : boolean Returns true if the given address belongs to one of the identities.
hasSignature ( boolean $compose_page = false ) : boolean Does the user have any signatures (either text or HTML)?
save ( )
saveSentmail ( integer $ident = null ) : boolean Returns true if the mail should be saved and the user is allowed to.
setValue ( $key, $val, $identity = null ) Sets a property with a specified value.
verify ( integer $identity = null ) Verifies and sanitizes all identity properties.

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

Метод Описание
_identitiesWithDefaultFirst ( ) : array Returns the list of identities with the default identity positioned first.

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

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

Reads all the user's identities from the prefs object or builds a new identity from the standard values given in prefs.php.
См. также: __construct()
public __construct ( $params )

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

Returns the list of identities with the default identity positioned first.
protected _identitiesWithDefaultFirst ( ) : array
Результат array The identity keys with the default identity first.

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

Returns all aliases based on the chosen identity.
public getAliasAddress ( integer $ident = null ) : Horde_Mail_Rfc822_List
$ident integer The identity to retrieve the aliases from.
Результат Horde_Mail_Rfc822_List Aliases for the identity.

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

Returns all identities' From addresses.
public getAllFromAddresses ( ) : Horde_Mail_Rfc822_List
Результат Horde_Mail_Rfc822_List Address list.

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

Returns a list of all e-mail addresses from all identities, including both from addresses and tie addreses.
public getAllIdentityAddresses ( ) : Horde_Mail_Rfc822_List
Результат Horde_Mail_Rfc822_List A list of e-mail addresses.

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

Returns an array with the sent-mail mailboxes from all identities.
public getAllSentmail ( boolean $unique = true ) : array
$unique boolean If true, return the unique list of sent-mail mailboxes. If false, returns list of sent-mail mailboxes, with the key corresponding to the identity.
Результат array The array with the sent-mail IMP_Mailbox objects.

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

Returns an array with the signatures from all identities
public getAllSignatures ( string $type = 'text' ) : array
$type string Either 'text' or 'html'.
Результат array The array with all the signatures.

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

Get all 'tie to' address/identity pairs.
public getAllTieAddresses ( ) : Horde_Mail_Rfc822_List
Результат Horde_Mail_Rfc822_List A list of e-mail addresses.

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

Returns the BCC addresses for a given identity.
public getBccAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List
$ident integer The identity to retrieve the Bcc addresses from.
Результат Horde_Mail_Rfc822_List BCC addresses.

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

Returns the from address based on the chosen identity. If no address can be found it is built from the current user name and the specified maildomain.
public getFromAddress ( integer $ident = null ) : Horde_Mail_Rfc822_Address
$ident integer The identity to retrieve the address from.
Результат Horde_Mail_Rfc822_Address A valid from address.

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

Returns all From addresses for one identity.
public getFromAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List
$ident integer The identity to retrieve the from addresses from.
Результат Horde_Mail_Rfc822_List Address list.

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

Returns a complete From: header based on all relevant factors (fullname, from address, input fields, locks etc.)
public getFromLine ( integer $ident = null, string $from_address = '' ) : Horde_Mail_Rfc822_Address
$ident integer The identity to retrieve the values from.
$from_address string A default from address to use if no identity is selected and the from_addr preference is locked.
Результат Horde_Mail_Rfc822_Address The address to use for From header.

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

Returns the user's full name.
public getFullname ( integer $ident = null ) : string
$ident integer The identity to retrieve the name from.
Результат string The user's full name.

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

Returns the identity's id that matches the passed addresses.
public getMatchingIdentity ( mixed $addresses, boolean $search_own = true ) : integer
$addresses mixed Either an array or a single string or a comma-separated list of email addresses.
$search_own boolean Search for a matching identity in own addresses also?
Результат integer The id of the first identity that from or alias addresses match (one of) the passed addresses or null if none matches.

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

Returns an array with the necessary values for the identity select box in the IMP compose window.
public getSelectList ( ) : array
Результат array The array with the necessary strings

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

Returns the full signature based on the current settings for the signature itself, the dashes and the position.
public getSignature ( string $type = 'text', integer $ident = null ) : string
$type string Either 'text' or 'html'.
$ident integer The identity to retrieve the signature from.
Результат string The full signature.

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

Get tie-to addresses.
public getTieAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List
$ident integer The identity to retrieve the tie-to addresses from.
Результат Horde_Mail_Rfc822_List A list of tie-to e-mail addresses.

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

Returns a property from one of the identities.
См. также: getValue()
public getValue ( $key, $identity = null )

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

This function will search aliases for an identity automatically.
public hasAddress ( mixed $address ) : boolean
$address mixed The address(es) to search for in the identities.
Результат boolean True if the address was found.

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

Does the user have any signatures (either text or HTML)?
public hasSignature ( boolean $compose_page = false ) : boolean
$compose_page boolean If true, checks for signatures as used on the compose pages.
Результат boolean True if the user has at least one signature.

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

public save ( )

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

Returns true if the mail should be saved and the user is allowed to.
public saveSentmail ( integer $ident = null ) : boolean
$ident integer The identity to retrieve the setting from.
Результат boolean True if the sent mail should be saved.

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

Sets a property with a specified value.
См. также: setValue()
public setValue ( $key, $val, $identity = null )

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

Verifies and sanitizes all identity properties.
public verify ( integer $identity = null )
$identity integer The identity to verify.

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

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

Cached data.
protected array $_cached
Результат array

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

Identity preferences added by IMP.
protected array $_impPrefs
Результат array