\Horde_Mime_Headers_ContentParam

This class represents a header element that contains MIME content parameters (RFCs 2045, 2183, 2231).

Summary

Methods
Properties
Constants
__get()
__toString()
getHandles()
__construct()
setValue()
sendEncode()
isDefault()
getIterator()
__clone()
encode()
setContentParamValue()
decode()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
serialize()
unserialize()
$params
$full_value
$value
$name
$value_single
No constants found
_setValue()
_sendEncode()
_sanityCheck()
_encode()
_escapeParams()
$_name
$_values
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$params

$params : array

Content parameters.

Type

array

$full_value

$full_value : string

Full header value.

Type

string

$value

$value : string

Header value.

Type

string

$name

$name : string

Header name.

Type

string

$value_single

$value_single : string

The first header value.

Type

string

$_name

$_name : string

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

Type

string

$_values

$_values : array

Header values.

Type

array

$_params

$_params : \Horde_Support_CaseInsensitiveArray

Content parameters.

Type

\Horde_Support_CaseInsensitiveArray

Methods

__get()

__get(  $name) 

Parameters

$name

__toString()

__toString() 

getHandles()

getHandles() : array

Return list of explicit header names handled by this driver.

Returns

array —

Header list.

__construct()

__construct(string  $name, mixed  $value) 

Constructor.

Parameters

string $name

Header name.

mixed $value

Header value(s).

setValue()

setValue(mixed  $value) 

Set the value of the header.

Parameters

mixed $value

Header value(s).

sendEncode()

sendEncode(array  $opts = array()) : array

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

Parameters

array $opts

Additional options:

  • charset: (string) Charset to encode to. DEFAULT: UTF-8

Returns

array —

An array of string values.

isDefault()

isDefault() : boolean

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

Returns

boolean —

True if this header is the default value.

getIterator()

getIterator() 

__clone()

__clone() 

encode()

encode(array  $opts = array()) : array

Encodes a MIME content parameter string pursuant to RFC 2183 & 2231 (Content-Type and Content-Disposition headers).

Parameters

array $opts

Options:

  • broken_rfc2231: (boolean) Attempt to work around non-RFC 2231-compliant MUAs by generating both a RFC 2047-like parameter name and also the correct RFC 2231 parameter DEFAULT: false
  • charset: (string) The charset to encode to. DEFAULT: UTF-8
  • lang: (string) The language to use when encoding. DEFAULT: None specified

Returns

array —

The encoded parameter string (US-ASCII).

setContentParamValue()

setContentParamValue(string  $data) 

Set the content-parameter base value.

Parameters

string $data

Value.

decode()

decode(mixed  $data) 

Decodes a MIME content parameter string pursuant to RFC 2183 & 2231 (Content-Type and Content-Disposition headers).

Stores value/parameter data in the current object.

Parameters

mixed $data

Parameter data. Either an array or a string.

offsetExists()

offsetExists(  $offset) 

Parameters

$offset

offsetGet()

offsetGet(  $offset) 

Parameters

$offset

offsetSet()

offsetSet(  $offset,   $value) 

Parameters

$offset
$value

offsetUnset()

offsetUnset(  $offset) 

Parameters

$offset

serialize()

serialize() 

unserialize()

unserialize(  $data) 

Parameters

$data

_setValue()

_setValue(mixed  $data) 

TODO

Parameters

mixed $data

Either an array (interpreted as a list of parameters), a string (interpreted as a RFC encoded parameter list), an object with two properties: value and params, or a Horde_Mime_Headers_ContentParam object.

_sendEncode()

_sendEncode(array  $opts) 

Parameters

array $opts

See encode().

_sanityCheck()

_sanityCheck(string  $data) : string

Perform sanity checking on a header value.

Parameters

string $data

The header data.

Returns

string —

The cleaned header data.

_encode()

_encode(  $name,   $val,   $opts) 

Parameters

$name
$val
$opts

_escapeParams()

_escapeParams(array  $params) : array

Escape the parameter array.

Parameters

array $params

Parameter array.

Returns

array —

Escaped parameter array.