Свойство | Тип | Описание | |
---|---|---|---|
$_default | integer | This one is used by the methods returning values if no other one is specified. | |
$_identities | array | Array containing all the user's identities. | |
$_prefnames | array | Preference names. | |
$_prefs | Horde_Prefs | The prefs object that this Identity points to. | |
$_user | string | The user whose identities these are. |
Метод | Описание | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
add ( array $identity = [] ) : integer | Adds a new identity to the array of identities. | |
count ( ) | ||
delete ( integer $identity ) : array | Removes an identity from the array of identities. | |
get ( integer $identity = null ) : array | Returns a complete identity hash. | |
getAll ( string $key ) : array | Returns an array with the specified property from all existing identities. | |
getDefault ( ) : integer | Returns a pointer to the current default identity. | |
getDefaultFromAddress ( boolean $fullname = false ) : Horde_Mail_Rfc822_Address | Generates the from address to use for the default identity. | |
getFromAddress ( integer $ident = null ) : Horde_Mail_Rfc822_Address | Returns the from address based on the chosen identity. | |
getIterator ( ) | ||
getName ( integer $ident = null ) : string | Returns the user's full name. | |
getValue ( string $key, integer $identity = null ) : mixed | Returns a property from one of the identities. If this value doesn't exist or is locked, the property is retrieved from the prefs backend. | |
hasValue ( string $key, string $value ) : boolean | Returns true if the given address belongs to one of the identities. | |
init ( ) | Creates a default identity if none exists yet and sets the preferences up if the identities are locked. | |
isLocked ( ) : boolean | Returns true if all properties are locked and therefore nothing in the identities can be changed. | |
offsetExists ( $offset ) | ||
offsetGet ( $offset ) | ||
offsetSet ( $offset, $value ) | ||
offsetUnset ( $offset ) | ||
save ( ) | Saves all identities in the prefs backend. | |
setDefault ( integer $identity ) : boolean | Sets the current default identity. | |
setValue ( string $key, mixed $val, integer $identity = null ) : boolean | Sets a property with a specified value. | |
verify ( integer $identity = null ) | Verifies and sanitizes all identity properties. |
public __construct ( array $params = [] ) | ||
$params | array | Parameters: - default_identity: (string) The preference name for the default identity. DEFAULT: 'default_identity' - from_addr: (string) The preference name for the user's from e-mail address. DEFAULT: 'from_addr' - fullname: (string) The preference name for the user's full name. DEFAULT: 'fullname' - id: (string) The preference name for the identity name. DEFAULT: 'id' - identities: (string) The preference name for the identity store. DEFAULT: 'identities' - prefs: (Horde_Prefs) [REQUIRED] The prefs object to use. - properties: (array) The list of properties for the identity. DEFAULT: array('from_addr', 'fullname', 'id') - user: (string) [REQUIRED] The user whose prefs we are handling. |
public getDefault ( ) : integer | ||
Результат | integer | The pointer to the current default identity. |
public getDefaultFromAddress ( boolean $fullname = false ) : Horde_Mail_Rfc822_Address | ||
$fullname | boolean | Include the fullname information. |
Результат | Horde_Mail_Rfc822_Address | The default from address (object returned since 2.2.0). |
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. |
public init ( ) |
public setDefault ( integer $identity ) : boolean | ||
$identity | integer | The pointer to the new default identity. |
Результат | boolean | True on success, false on failure. |
public setValue ( string $key, mixed $val, integer $identity = null ) : boolean | ||
$key | string | The property to set. |
$val | mixed | The value to which the property should be set. |
$identity | integer | The identity to set the property in. |
Результат | boolean | True on success, false on failure (property was locked). |
protected int $_default | ||
Результат | integer |
protected array $_identities | ||
Результат | array |
protected Horde_Prefs $_prefs | ||
Результат | Horde_Prefs |
protected string $_user | ||
Результат | string |