Documentation

Horde_Mime_Headers_Addresses extends Horde_Mime_Headers_Element_Single
in package
implements Horde_Mime_Headers_Element_Address

This class represents address fields (RFC 5322).

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2014-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

since
2.5.0

Interfaces, Classes, Traits and Enums

Horde_Mime_Headers_Element_Address
An interface to indicate that the header element represents e-mail address data (RFC 5322).

Table of Contents

$append_addr  : bool
By default, if more than 1 address header is found, the addresses are appended together into a single field. Set this value to false to ignore all but the *last* header.
$full_value  : string
$name  : string
$value  : string
$value_single  : string
$_name  : string
Header name (UTF-8, although limited to US-ASCII subset by RFCs).
$_values  : array<string|int, mixed>
Header values.
__clone()  : mixed
__construct()  : mixed
Constructor.
__get()  : mixed
__toString()  : mixed
doSendEncode()  : mixed
Do send encoding for addresses.
getAddressList()  : mixed
Return the address list representation(s) for this header.
getHandles()  : array<string|int, mixed>
Return list of explicit header names handled by this driver.
getIterator()  : mixed
isDefault()  : bool
If true, indicates the contents of the header is the default value.
sendEncode()  : array<string|int, mixed>
Returns the encoded string value(s) needed when sending the header text to a RFC compliant mail submission server.
setValue()  : mixed
Set the value of the header.
_sanityCheck()  : string
Perform sanity checking on a header value.
_sendEncode()  : mixed
_setValue()  : mixed
TODO

Properties

$append_addr

By default, if more than 1 address header is found, the addresses are appended together into a single field. Set this value to false to ignore all but the *last* header.

public bool $append_addr = \true

$full_value read-only

public string $full_value

Full header value.

$name read-only

public string $name

Header name.

$value read-only

public string $value

Header value.

$value_single read-only

public string $value_single

The first header value.

$_name

Header name (UTF-8, although limited to US-ASCII subset by RFCs).

protected string $_name

$_values

Header values.

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

Methods

__clone()

public __clone() : mixed
Return values
mixed

__construct()

Constructor.

public __construct(string $name, mixed $value) : mixed
Parameters
$name : string

Header name.

$value : mixed

Header value(s).

Return values
mixed

__get()

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

__toString()

public __toString() : mixed
Return values
mixed

doSendEncode()

Do send encoding for addresses.

public static doSendEncode(array<string|int, mixed> $alist[, array<string|int, mixed> $opts = array() ]) : mixed

Needed as a static function because it is used by both single and multiple address headers.

Parameters
$alist : array<string|int, mixed>

An array of Horde_Mail_Rfc822_List objects.

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

Additional options:

  • charset: (string) Encodes the headers using this charset. DEFAULT: UTF-8
  • defserver: (string) The default domain to append to mailboxes. DEFAULT: No default name.
  • idn: (boolean) Encode IDN domain names (RFC 3490) if true. DEFAULT: true
Tags
todo

Implement with traits.

Return values
mixed

getAddressList()

Return the address list representation(s) for this header.

public getAddressList([mixed $first = false ]) : mixed
Parameters
$first : mixed = false

If true, return only the first element rather than the entire list.

Return values
mixed

A Horde_Mail_Rfc822_List object (if $first is true) or an array of those objects.

getHandles()

Return list of explicit header names handled by this driver.

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

Header list.

getIterator()

public getIterator() : mixed
Return values
mixed

isDefault()

If true, indicates the contents of the header is the default value.

public isDefault() : bool
Tags
since
2.8.0
Return values
bool

True if this header is the default value.

sendEncode()

Returns the encoded string value(s) needed when sending the header text to a RFC compliant mail submission server.

public final sendEncode([array<string|int, mixed> $opts = array() ]) : array<string|int, mixed>
Parameters
$opts : array<string|int, mixed> = array()

Additional options:

  • charset: (string) Charset to encode to. DEFAULT: UTF-8
Return values
array<string|int, mixed>

An array of string values.

setValue()

Set the value of the header.

public final setValue(mixed $value) : mixed
Parameters
$value : mixed

Header value(s).

Return values
mixed

_sanityCheck()

Perform sanity checking on a header value.

protected _sanityCheck(string $data) : string
Parameters
$data : string

The header data.

Return values
string

The cleaned header data.

_sendEncode()

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

See doSendEncode().

Return values
mixed

Search results