PHP Class IMP_Ajax_Addresses, horde

Author: Michael Slusarz ([email protected])
Show file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
__construct ( Horde_Mail_Rfc822_Object $addr ) Constructor.
toArray ( integer $limit = null ) : object Output the address list.
toAutocompleteArray ( integer $limit = null ) : array Creates the output list for the 'email' autocomplete search.

Protected Methods

Method Description
_toAutocompleteArray ( Horde_Mail_Rfc822_List $alist, integer $limit )

Private Methods

Method Description
_addAddress ( Horde_Mail_Rfc822_Address $addr ) : object Create a bare address entry.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Mail_Rfc822_Object $addr )
$addr Horde_Mail_Rfc822_Object Address object.

_toAutocompleteArray() protected method

See also: toAutocompleteArray
protected _toAutocompleteArray ( Horde_Mail_Rfc822_List $alist, integer $limit )
$alist Horde_Mail_Rfc822_List Address list.
$limit integer Limit to this many entries.

toArray() public method

Output the address list.
public toArray ( integer $limit = null ) : object
$limit integer Limit display to this many addresses. If null, shows all addresses.
return object Object with the following properties: - addr: (array) Array of objects with 2 possible formats: - Address keys: 'b' (bare address); 'p' (personal part) - Group keys: 'a' (list of addresses); 'g' (group name) - Both: 'v' (full value of address) - limit: (boolean) True if limit was reached. - total: (integer) Total address count.

toAutocompleteArray() public method

Creates the output list for the 'email' autocomplete search.
public toAutocompleteArray ( integer $limit = null ) : array
$limit integer Limit display to this many addresses. If null, shows all addresses.
return array An array with the following keys for each result:
  - g: (array) List of addresses in the group.
  - l: (string) Full label.
  - s: (string) Short display string.
  - v: (string) Value.