Documentation

Horde_Mail_Rfc822_GroupList extends Horde_Mail_Rfc822_List
in package

Container object for a collection of group addresses.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2012-2017 Horde LLC

license

http://www.horde.org/licenses/bsd New BSD License

Table of Contents

BASE_ELEMENTS  = 2
HIDE_GROUPS  = 1
Filter masks.
$addresses  : array<string|int, mixed>
$bare_addresses  : array<string|int, mixed>
$bare_addresses_idn  : array<string|int, mixed>
$base_addresses  : array<string|int, mixed>
$raw_addresses  : array<string|int, mixed>
$_data  : array<string|int, mixed>
List data.
$_filter  : array<string|int, mixed>
Current Iterator filter.
$_ptr  : array<string|int, mixed>
Current Iterator pointer.
__construct()  : mixed
Constructor.
__get()  : mixed
__serialize()  : array<string|int, mixed>
__toString()  : string
String representation of object.
__unserialize()  : void
add()  : mixed
Add objects to the container.
contains()  : bool
Does this list contain the given e-mail address?
count()  : int
Address count.
current()  : mixed
first()  : Horde_Mail_Rfc822_Object
Convenience method to return the first element in a list.
groupCount()  : int
Group count.
key()  : mixed
match()  : bool
Compare this object against other data.
next()  : mixed
offsetExists()  : mixed
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
remove()  : mixed
Remove addresses from the container. This method ignores Group objects.
rewind()  : mixed
seek()  : mixed
serialize()  : mixed
setIteratorFilter()  : mixed
Set the Iterator filter.
unique()  : mixed
Removes duplicate addresses from list. This method ignores Group objects.
unserialize()  : mixed
valid()  : mixed
writeAddress()  : string
Write an address given information in this part.
_iteratorFilter()  : mixed
_normalize()  : array<string|int, mixed>
Normalize objects to add to list.
_writeAddress()  : string
Class-specific implementation of writeAddress().

Constants

BASE_ELEMENTS

public mixed BASE_ELEMENTS = 2

HIDE_GROUPS

Filter masks.

public mixed HIDE_GROUPS = 1

Properties

$addresses read-only

public array<string|int, mixed> $addresses

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

$bare_addresses read-only

public array<string|int, mixed> $bare_addresses

The list of all addresses (mail@host).

$bare_addresses_idn read-only

public array<string|int, mixed> $bare_addresses_idn

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

$base_addresses read-only

public array<string|int, mixed> $base_addresses

The list of ONLY base addresses (Address objects).

$raw_addresses read-only

public array<string|int, mixed> $raw_addresses

The list of all addresses (Address objects).

$_data

List data.

protected array<string|int, mixed> $_data = array()

$_filter

Current Iterator filter.

protected array<string|int, mixed> $_filter = array()

$_ptr

Current Iterator pointer.

protected array<string|int, mixed> $_ptr

Methods

__construct()

Constructor.

public __construct([mixed $obs = null ]) : mixed
Parameters
$obs : mixed = null

Address data to store in this object.

Return values
mixed

__get()

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

__serialize()

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

__toString()

String representation of object.

public __toString() : string
Return values
string

Returns the full e-mail address.

__unserialize()

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

add()

Add objects to the container.

public add(mixed $obs) : mixed
Parameters
$obs : mixed

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

Return values
mixed

contains()

Does this list contain the given e-mail address?

public contains(mixed $address) : bool
Parameters
$address : mixed

An e-mail address.

Return values
bool

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

count()

Address count.

public count() : int
Return values
int

The number of addresses.

current()

public current() : mixed
Return values
mixed

first()

Convenience method to return the first element in a list.

public first() : Horde_Mail_Rfc822_Object

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

Tags
since
2.5.0
Return values
Horde_Mail_Rfc822_Object

Rfc822 object, or null if no object.

groupCount()

Group count.

public groupCount() : int
Return values
int

The number of groups in the list.

key()

public key() : mixed
Return values
mixed

match()

Compare this object against other data.

public abstract match(mixed $ob) : bool
Parameters
$ob : mixed

Address data.

Return values
bool

True if the data reflects the same canonical address.

next()

public next() : mixed
Return values
mixed

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

remove()

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

public remove(mixed $obs) : mixed
Parameters
$obs : mixed

Addresses to remove.

Return values
mixed

rewind()

public rewind() : mixed
Return values
mixed

seek()

public seek(mixed $position) : mixed
Parameters
$position : mixed
Return values
mixed

serialize()

public serialize() : mixed
Return values
mixed

setIteratorFilter()

Set the Iterator filter.

public setIteratorFilter(int $mask[, mixed $filter = null ]) : mixed
Parameters
$mask : int

Filter masks.

$filter : mixed = null

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

Return values
mixed

unique()

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

public unique() : mixed
Return values
mixed

unserialize()

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

valid()

public valid() : mixed
Return values
mixed

writeAddress()

Write an address given information in this part.

public writeAddress([mixed $opts = array() ]) : string
Parameters
$opts : mixed = array()

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
Return values
string

The correctly escaped/quoted address.

_iteratorFilter()

protected _iteratorFilter(mixed $ob) : mixed
Parameters
$ob : mixed
Return values
mixed

_normalize()

Normalize objects to add to list.

protected _normalize(mixed $obs) : array<string|int, mixed>
Parameters
$obs : mixed

Address data to store in this object.

Return values
array<string|int, mixed>

Entries to add.

_writeAddress()

Class-specific implementation of writeAddress().

protected abstract _writeAddress(array<string|int, mixed> $opts) : string
Parameters
$opts : array<string|int, mixed>

See writeAddress().

Tags
see
writeAddress()
Return values
string

The correctly escaped/quoted address.

Search results