Horde_Mime
in package
Provide methods for dealing with MIME encoding (RFC 2045-2049);
Tags
Table of Contents
- EOL = "\r\n"
- The RFC defined EOL string.
- MIME_PARAM_QUOTED = '/[\\x01-\\x20\\x22\\x28\\x29\\x2c\\x2f\\x3a-\\x40\\x5b-\\x5d]/'
- $brokenRFC2231 : mixed
- $decodeWindows1252 : bool
- Use windows-1252 charset when decoding ISO-8859-1 data? HTML 5 requires this behavior, so it is the default.
- decode() : string
- Decodes a MIME encoded (RFC 2047) string.
- decodeParam() : mixed
- encode() : string
- MIME encodes a string (RFC 2047).
- encodeParam() : mixed
- generateMessageId() : mixed
- is8bit() : bool
- Determines if a string contains 8-bit (non US-ASCII) characters.
- isChild() : mixed
- mimeIdArithmetic() : mixed
- quotedPrintableEncode() : mixed
- uudecode() : mixed
Constants
EOL
The RFC defined EOL string.
public
string
EOL
= "\r\n"
MIME_PARAM_QUOTED
public
mixed
MIME_PARAM_QUOTED
= '/[\\x01-\\x20\\x22\\x28\\x29\\x2c\\x2f\\x3a-\\x40\\x5b-\\x5d]/'
Tags
Properties
$brokenRFC2231
public
static mixed
$brokenRFC2231
= \false
Tags
$decodeWindows1252
Use windows-1252 charset when decoding ISO-8859-1 data? HTML 5 requires this behavior, so it is the default.
public
static bool
$decodeWindows1252
= \true
Methods
decode()
Decodes a MIME encoded (RFC 2047) string.
public
static decode(string $string) : string
Parameters
- $string : string
-
The MIME encoded text.
Return values
string —The decoded text.
decodeParam()
public
static decodeParam(mixed $type, mixed $data) : mixed
Parameters
- $type : mixed
- $data : mixed
Tags
Return values
mixed —encode()
MIME encodes a string (RFC 2047).
public
static encode(string $text[, string $charset = 'UTF-8' ]) : string
Parameters
- $text : string
-
The text to encode (UTF-8).
- $charset : string = 'UTF-8'
-
The character set to encode to.
Return values
string —The MIME encoded string (US-ASCII).
encodeParam()
public
static encodeParam(mixed $name, mixed $val[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $name : mixed
- $val : mixed
- $opts : array<string|int, mixed> = array()
Tags
Return values
mixed —generateMessageId()
public
static generateMessageId() : mixed
Tags
Return values
mixed —is8bit()
Determines if a string contains 8-bit (non US-ASCII) characters.
public
static is8bit(string $string[, string $charset = null ]) : bool
Parameters
- $string : string
-
The string to check.
- $charset : string = null
-
The charset of the string. Defaults to US-ASCII. (@deprecated)
Return values
bool —True if string contains non 7-bit characters.
isChild()
public
static isChild(mixed $base, mixed $id) : mixed
Parameters
- $base : mixed
- $id : mixed
Tags
Return values
mixed —mimeIdArithmetic()
public
static mimeIdArithmetic(mixed $id, mixed $action[, mixed $options = array() ]) : mixed
Parameters
- $id : mixed
- $action : mixed
- $options : mixed = array()
Tags
Return values
mixed —quotedPrintableEncode()
public
static quotedPrintableEncode(mixed $text[, mixed $eol = self::EOL ][, mixed $wrap = 76 ]) : mixed
Parameters
- $text : mixed
- $eol : mixed = self::EOL
- $wrap : mixed = 76
Tags
Return values
mixed —uudecode()
public
static uudecode(mixed $input) : mixed
Parameters
- $input : mixed