PHP Class IMP_Prefs_Identity, horde

Author: Jan Schneider ([email protected])
Author: Chuck Hagenbuch ([email protected])
Inheritance: extends Horde_Core_Prefs_Identity
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_cached array Cached data.
$_impPrefs array Identity preferences added by IMP.

Méthodes publiques

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

Méthodes protégées

Méthode Description
_identitiesWithDefaultFirst ( ) : array Returns the list of identities with the default identity positioned first.

Method Details

__construct() public méthode

Reads all the user's identities from the prefs object or builds a new identity from the standard values given in prefs.php.
See also: __construct()
public __construct ( $params )

_identitiesWithDefaultFirst() protected méthode

Returns the list of identities with the default identity positioned first.
protected _identitiesWithDefaultFirst ( ) : array
Résultat array The identity keys with the default identity first.

getAliasAddress() public méthode

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.
Résultat Horde_Mail_Rfc822_List Aliases for the identity.

getAllFromAddresses() public méthode

Returns all identities' From addresses.
public getAllFromAddresses ( ) : Horde_Mail_Rfc822_List
Résultat Horde_Mail_Rfc822_List Address list.

getAllIdentityAddresses() public méthode

Returns a list of all e-mail addresses from all identities, including both from addresses and tie addreses.
public getAllIdentityAddresses ( ) : Horde_Mail_Rfc822_List
Résultat Horde_Mail_Rfc822_List A list of e-mail addresses.

getAllSentmail() public méthode

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.
Résultat array The array with the sent-mail IMP_Mailbox objects.

getAllSignatures() public méthode

Returns an array with the signatures from all identities
public getAllSignatures ( string $type = 'text' ) : array
$type string Either 'text' or 'html'.
Résultat array The array with all the signatures.

getAllTieAddresses() public méthode

Get all 'tie to' address/identity pairs.
public getAllTieAddresses ( ) : Horde_Mail_Rfc822_List
Résultat Horde_Mail_Rfc822_List A list of e-mail addresses.

getBccAddresses() public méthode

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.
Résultat Horde_Mail_Rfc822_List BCC addresses.

getFromAddress() public méthode

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.
Résultat Horde_Mail_Rfc822_Address A valid from address.

getFromAddresses() public méthode

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.
Résultat Horde_Mail_Rfc822_List Address list.

getFromLine() public méthode

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.
Résultat Horde_Mail_Rfc822_Address The address to use for From header.

getFullname() public méthode

Returns the user's full name.
public getFullname ( integer $ident = null ) : string
$ident integer The identity to retrieve the name from.
Résultat string The user's full name.

getMatchingIdentity() public méthode

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?
Résultat integer The id of the first identity that from or alias addresses match (one of) the passed addresses or null if none matches.

getSelectList() public méthode

Returns an array with the necessary values for the identity select box in the IMP compose window.
public getSelectList ( ) : array
Résultat array The array with the necessary strings

getSignature() public méthode

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.
Résultat string The full signature.

getTieAddresses() public méthode

Get tie-to addresses.
public getTieAddresses ( integer $ident = null ) : Horde_Mail_Rfc822_List
$ident integer The identity to retrieve the tie-to addresses from.
Résultat Horde_Mail_Rfc822_List A list of tie-to e-mail addresses.

getValue() public méthode

Returns a property from one of the identities.
See also: getValue()
public getValue ( $key, $identity = null )

hasAddress() public méthode

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.
Résultat boolean True if the address was found.

hasSignature() public méthode

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.
Résultat boolean True if the user has at least one signature.

save() public méthode

public save ( )

saveSentmail() public méthode

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.
Résultat boolean True if the sent mail should be saved.

setValue() public méthode

Sets a property with a specified value.
See also: setValue()
public setValue ( $key, $val, $identity = null )

verify() public méthode

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

Property Details

$_cached protected_oe property

Cached data.
protected array $_cached
Résultat array

$_impPrefs protected_oe property

Identity preferences added by IMP.
protected array $_impPrefs
Résultat array