Class Identity_imp

Description

This class provides an IMP-specific interface to all identities a user might have. Its methods take care of any site-specific restrictions configured in prefs.php and conf.php.

$Horde: imp/lib/Identity/imp.php,v 1.44.2.22 2009/01/06 15:24:08 jan Exp $

Copyright 2001-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html.

Located in /lib/Identity/imp.php (line 21)

Identity
   |
   --Identity_imp
Variable Summary
 array $_aliases
 array $_fromList
 array $_names
 array $_signatures
Method Summary
 Identity_imp Identity_imp ()
 array getAliasAddress (integer $ident)
 array getAllFromAddresses ([boolean $alias = false])
 array getAllFromLines ()
 array getAllSignatures ()
 array getBccAddresses ([integer $ident = null])
 string getFromAddress ([integer $ident = null])
 string getFromLine ([integer $ident = null], [string $from_address = ''])
 string getFullname ([integer $ident = null])
 integer getMatchingIdentity (mixed $addresses, [boolean $search_ties = true])
 array getSelectList ()
 string getSignature ([integer $ident = null])
 void getValue ( $key, [ $identity = null])
 boolean hasAddress (string $address)
 boolean saveSentmail ([integer $ident = null])
 boolean|object verify ([integer $identity = null])
Variables
array $_aliases = array() (line 28)

Cached alias list.

array $_fromList = array() (line 35)

Cached from address list.

array $_names = array() (line 42)

Cached names list.

array $_signatures = array() (line 49)

Cached signature list.

Methods
Constructor Identity_imp (line 55)

Reads all the user's identities from the prefs object or builds a new identity from the standard values given in prefs.php.

Identity_imp Identity_imp ()
getAliasAddress (line 258)

Returns all aliases based on the chosen identity.

  • return: Aliases for the identity.
array getAliasAddress (integer $ident)
  • integer $ident: The identity to retrieve the aliases from.
getAllFromAddresses (line 277)

Returns an array with all identities' from addresses.

  • return: The array with KEY - address VAL - identity number
array getAllFromAddresses ([boolean $alias = false])
  • boolean $alias: Include aliases?
getAllFromLines (line 179)

Returns an array with From: headers from all identities

  • return: The From: headers from all identities
array getAllFromLines ()
getAllSentmailFolders (line 525)

Returns an array with the sent-mail folder names from all the identities.

  • return: The array with the folder names.
array getAllSentmailFolders ()
getAllSignatures (line 492)

Returns an array with the signatures from all identities

  • return: The array with all the signatures.
array getAllSignatures ()
getAllTieAddresses (line 306)

Get all 'tie to' address/identity pairs.

  • return: The array with KEY - address VAL - identity number
array getAllTieAddresses ()
getBccAddresses (line 347)

Returns the BCC addresses for a given identity.

  • return: The array of objects (IMAP addresses).
array getBccAddresses ([integer $ident = null])
  • integer $ident: The identity to retrieve the Bcc addresses from.
getFromAddress (line 231)

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.

  • return: A valid from address.
string getFromAddress ([integer $ident = null])
  • integer $ident: The identity to retrieve the address from.
getFromLine (line 135)

Returns a complete From: header based on all relevant factors (fullname, from address, input fields, locks etc.)

  • return: A full From: header in the format 'Fullname <user@example.com>'.
string getFromLine ([integer $ident = null], [string $from_address = ''])
  • integer $ident: The identity to retrieve the values from.
  • string $from_address: A default from address to use if no identity is selected and the from_addr preference is locked.
getFullname (line 437)

Returns the user's full name.

  • return: The user's full name.
string getFullname ([integer $ident = null])
  • integer $ident: The identity to retrieve the name from.
getMatchingIdentity (line 376)

Returns the identity's id that matches the passed addresses.

  • return: The id of the first identity that from or alias addresses match (one of) the passed addresses or null if none matches.
integer getMatchingIdentity (mixed $addresses, [boolean $search_ties = true])
  • mixed $addresses: Either an array or a single string or a comma-separated list of email addresses.
  • boolean $search_ties: Search for a matching identity in tied addresses too?
getSelectList (line 193)

Returns an array with the necessary values for the identity select box in the IMP compose window.

  • return: The array with the necessary strings
array getSelectList ()
getSignature (line 456)

Returns the full signature based on the current settings for the signature itself, the dashes and the position.

  • return: The full signature.
string getSignature ([integer $ident = null])
  • integer $ident: The identity to retrieve the signature from.
getValue (line 510)
  • see: Identity::getValue()
void getValue ( $key, [ $identity = null])
  • $key
  • $identity
hasAddress (line 210)

Returns true if the given address belongs to one of the identities.

This function will search aliases for an identity automatically.

  • return: True if the address was found.
boolean hasAddress (string $address)
  • string $address: The address to search for in the identities.
saveSentmail (line 545)

Returns true if the mail should be saved and the user is allowed to.

  • return: True if the sent mail should be saved.
boolean saveSentmail ([integer $ident = null])
  • integer $ident: The identity to retrieve the setting from.
verify (line 73)

Verifies and sanitizes all identity properties.

  • return: True if the properties are valid or a PEAR_Error with an error description otherwise.
boolean|object verify ([integer $identity = null])
  • integer $identity: The identity to verify.

Documentation generated on Sun, 30 Jan 2011 05:28:12 +0000 by phpDocumentor 1.4.3