Documentation

Horde_Mime_Headers_ContentParam extends Horde_Mime_Headers_Element_Single
in package
implements ArrayAccess, Horde_Mime_Headers_Extension_Mime, Serializable

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

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

ArrayAccess
Horde_Mime_Headers_Extension_Mime
This interface indicates the header is MIME based (RFC 2045 et al.) rather than transport (i.e. RFC 5322) based.
Serializable

Table of Contents

$full_value  : string
$name  : string
$params  : array<string|int, mixed>
$value  : string
$value_single  : string
$_name  : string
Header name (UTF-8, although limited to US-ASCII subset by RFCs).
$_params  : Horde_Support_CaseInsensitiveArray
Content parameters.
$_values  : array<string|int, mixed>
Header values.
__clone()  : mixed
__construct()  : mixed
Constructor.
__get()  : mixed
__serialize()  : array<string|int, mixed>
Serialize (PHP 7.4+)
__toString()  : mixed
__unserialize()  : void
Unserialize (PHP 7.4+)
decode()  : mixed
Decodes a MIME content parameter string pursuant to RFC 2183 & 2231 (Content-Type and Content-Disposition headers).
encode()  : array<string|int, mixed>
Encodes a MIME content parameter string pursuant to RFC 2183 & 2231 (Content-Type and Content-Disposition headers).
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.
offsetExists()  : mixed
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
sendEncode()  : array<string|int, mixed>
Returns the encoded string value(s) needed when sending the header text to a RFC compliant mail submission server.
serialize()  : string
Serialize (until PHP 7.3)
setContentParamValue()  : mixed
Set the content-parameter base value.
setValue()  : mixed
Set the value of the header.
unserialize()  : mixed
Unserialize (until PHP 7.3)
_encode()  : mixed
_escapeParams()  : array<string|int, mixed>
Escape the parameter array.
_sanityCheck()  : string
Perform sanity checking on a header value.
_sendEncode()  : mixed
_setValue()  : mixed
TODO

Properties

$full_value read-only

public string $full_value

Full header value.

$name read-only

public string $name

Header name.

$params read-only

public array<string|int, mixed> $params

Content parameters.

$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

$_params

Content parameters.

protected Horde_Support_CaseInsensitiveArray $_params

$_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

__serialize()

Serialize (PHP 7.4+)

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

object state

__toString()

public __toString() : mixed
Return values
mixed

__unserialize()

Unserialize (PHP 7.4+)

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

decode()

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

public decode(mixed $data) : mixed

Stores value/parameter data in the current object.

Parameters
$data : mixed

Parameter data. Either an array or a string.

Return values
mixed

encode()

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

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

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
Return values
array<string|int, mixed>

The encoded parameter string (US-ASCII).

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.

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

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.

serialize()

Serialize (until PHP 7.3)

public serialize() : string
Return values
string

serialized object state

setContentParamValue()

Set the content-parameter base value.

public setContentParamValue(string $data) : mixed
Parameters
$data : string

Value.

Tags
since
2.8.0
Return values
mixed

setValue()

Set the value of the header.

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

Header value(s).

Return values
mixed

unserialize()

Unserialize (until PHP 7.3)

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

_encode()

protected _encode(mixed $name, mixed $val, mixed $opts) : mixed
Parameters
$name : mixed
$val : mixed
$opts : mixed
Tags
see
encode()
Return values
mixed

_escapeParams()

Escape the parameter array.

protected _escapeParams(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Parameter array.

Return values
array<string|int, mixed>

Escaped parameter array.

_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 encode().

Return values
mixed

_setValue()

TODO

protected _setValue(mixed $data) : mixed
Parameters
$data : mixed

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.

Return values
mixed

Search results