Constants

HIDE_GROUPS

HIDE_GROUPS

Filter masks.

BASE_ELEMENTS

BASE_ELEMENTS

Properties

$addresses

$addresses : array

The list of all addresses (address w/personal parts).

Type

array

$bare_addresses

$bare_addresses : array

The list of all addresses (mail@host).

Type

array

$bare_addresses_idn

$bare_addresses_idn : array

The list of all addresses (mail@host; IDN encoded). (@since 2.1.0)

Type

array

$base_addresses

$base_addresses : array

The list of ONLY base addresses (Address objects).

Type

array

$raw_addresses

$raw_addresses : array

The list of all addresses (Address objects).

Type

array

$_data

$_data : array

List data.

Type

array

$_filter

$_filter : array

Current Iterator filter.

Type

array

$_ptr

$_ptr : array

Current Iterator pointer.

Type

array

Methods

__construct()

__construct(mixed  $obs = null) 

Constructor.

Parameters

mixed $obs

Address data to store in this object.

__get()

__get(  $name) 

Parameters

$name

add()

add(mixed  $obs) 

Add objects to the container.

Parameters

mixed $obs

A RFC 822 object (or list of objects) to store in this object.

remove()

remove(mixed  $obs) 

Remove addresses from the container. This method ignores Group objects.

Parameters

mixed $obs

Addresses to remove.

unique()

unique() 

Removes duplicate addresses from list. This method ignores Group objects.

groupCount()

groupCount() : integer

Group count.

Returns

integer —

The number of groups in the list.

setIteratorFilter()

setIteratorFilter(integer  $mask, mixed  $filter = null) 

Set the Iterator filter.

Parameters

integer $mask

Filter masks.

mixed $filter

An e-mail, or as list of e-mails, to filter by.

match()

match(mixed  $ob) : boolean

Compare this object against other data.

Parameters

mixed $ob

Address data.

Returns

boolean —

True if the data reflects the same canonical address.

contains()

contains(mixed  $address) : boolean

Does this list contain the given e-mail address?

Parameters

mixed $address

An e-mail address.

Returns

boolean —

True if the e-mail address is contained in the list.

first()

first() : \Horde_Mail_Rfc822_Object

Convenience method to return the first element in a list.

Useful since it allows chaining; older PHP versions did not allow array access dereferencing from the results of a function call.

Returns

\Horde_Mail_Rfc822_Object

Rfc822 object, or null if no object.

offsetExists()

offsetExists(  $offset) 

Parameters

$offset

offsetGet()

offsetGet(  $offset) 

Parameters

$offset

offsetSet()

offsetSet(  $offset,   $value) 

Parameters

$offset
$value

offsetUnset()

offsetUnset(  $offset) 

Parameters

$offset

count()

count() : integer

Address count.

Returns

integer —

The number of addresses.

current()

current() 

key()

key() 

next()

next() 

rewind()

rewind() 

valid()

valid() 

seek()

seek(  $position) 

Parameters

$position

serialize()

serialize() 

unserialize()

unserialize(  $data) 

Parameters

$data

__toString()

__toString() : string

String representation of object.

Returns

string —

Returns the full e-mail address.

writeAddress()

writeAddress(mixed  $opts = array()) : string

Write an address given information in this part.

Parameters

mixed $opts

If boolean true, is equivalent to passing true for both 'encode' and 'idn'. If an array, these keys are supported:

  • comment: (boolean) If true, include comment(s) in output? @since 2.6.0 DEFAULT: false
  • encode: (mixed) MIME encode the personal/groupname parts? If boolean true, encodes in 'UTF-8'. If a string, encodes using this charset. DEFAULT: false
  • idn: (boolean) If true, encodes IDN domain names (RFC 3490). DEFAULT: false
  • noquote: (boolean) If true, don't quote personal part. [@since 2.4.0] DEFAULT: false

Returns

string —

The correctly escaped/quoted address.

_writeAddress()

_writeAddress(array  $opts) : string

Class-specific implementation of writeAddress().

Parameters

array $opts

See writeAddress().

Returns

string —

The correctly escaped/quoted address.

_normalize()

_normalize(mixed  $obs) : array

Normalize objects to add to list.

Parameters

mixed $obs

Address data to store in this object.

Returns

array —

Entries to add.

_iteratorFilter()

_iteratorFilter(  $ob) 

Parameters

$ob