Documentation

IMP_Contacts
in package
implements IteratorAggregate, Serializable, JsonSerializable

Common code dealing with contacts handling.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2012-2017 Horde LLC

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

Interfaces

IteratorAggregate
Serializable
JsonSerializable

Properties

$changed  : bool
$fields  : array<string|int, mixed>
$source_list  : array<string|int, mixed>
$sources  : array<string|int, mixed>
$_changed  : bool
Has the internal data changed?
$_fields  : array<string|int, mixed>
The list of search fields.
$_sources  : array<string|int, mixed>
The list of sources.

Methods

__get()  : mixed
__serialize()  : array<string|int, mixed>
__unserialize()  : void
addAddress()  : string
Adds e-mail address to the user defined address book.
clearCache()  : mixed
Clear cached contacts data.
getIterator()  : Horde_Mail_Rfc822_List
Returns the list of all contacts.
jsonSerialize()  : mixed
searchEmail()  : Horde_Mail_Rfc822_List
Search the addressbook for email addresses.
serialize()  : mixed
unserialize()  : mixed
_init()  : mixed
Initializes parameters needed to do an address search.

Properties

$changed read-only

public bool $changed

Has the internal data changed?

$fields read-only

public array<string|int, mixed> $fields

The list of configured search fields.

$source_list read-only

public array<string|int, mixed> $source_list

The list of sources in the contacts backend.

$sources read-only

public array<string|int, mixed> $sources

The list of configured sources.

$_changed

Has the internal data changed?

private bool $_changed = \false

$_fields

The list of search fields.

private array<string|int, mixed> $_fields

$_sources

The list of sources.

private array<string|int, mixed> $_sources

Methods

__get()

public __get(mixed $name) : mixed
Parameters
$name : mixed

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

addAddress()

Adds e-mail address to the user defined address book.

public addAddress(Horde_Mail_Rfc822_Object $addr) : string
Parameters
$addr : Horde_Mail_Rfc822_Object

Address or group to add.

Tags
throws
Horde_Exception
Return values
string

A link or message to show in the notification area (already HTML encoded).

clearCache()

Clear cached contacts data.

public clearCache() : mixed

getIterator()

Returns the list of all contacts.

public getIterator() : Horde_Mail_Rfc822_List
Return values
Horde_Mail_Rfc822_List

Listing of all contacts.

jsonSerialize()

public jsonSerialize() : mixed

searchEmail()

Search the addressbook for email addresses.

public searchEmail(string $str[, array<string|int, mixed> $opts = array() ]) : Horde_Mail_Rfc822_List
Parameters
$str : string

The search string.

$opts : array<string|int, mixed> = array()

Additional options:

  • email_exact: (boolean) Require exact match in e-mail?
  • levenshtein: (boolean) Do levenshtein sorting of results?
  • sources: (array) Use this list of sources instead of default.
Return values
Horde_Mail_Rfc822_List

Results.

unserialize()

public unserialize(mixed $data) : mixed
Parameters
$data : mixed

_init()

Initializes parameters needed to do an address search.

private _init() : mixed

        
On this page

Search results