Elgg  Version master
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
Laminas\Mime\Mime Class Reference

Support class for MultiPart Mime Messages. More...

Public Member Functions

 __construct ($boundary=null)
 Constructor. More...
 
 boundary ()
 Return a MIME boundary. More...
 
 boundaryLine ($EOL=self::LINEEND)
 Return a MIME boundary line. More...
 
 mimeEnd ($EOL=self::LINEEND)
 Return MIME ending. More...
 

Static Public Member Functions

static isPrintable ($str)
 Check if the given string is "printable". More...
 
static encodeQuotedPrintable ($str, $lineLength=self::LINELENGTH, $lineEnd=self::LINEEND)
 Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines. More...
 
static encodeQuotedPrintableHeader ($str, $charset, $lineLength=self::LINELENGTH, $lineEnd=self::LINEEND)
 Encode a given string with the QUOTED_PRINTABLE mechanism for Mail Headers. More...
 
static encodeBase64Header ($str, $charset, $lineLength=self::LINELENGTH, $lineEnd=self::LINEEND)
 Encode a given string in mail header compatible base64 encoding. More...
 
static encodeBase64 ($str, $lineLength=self::LINELENGTH, $lineEnd=self::LINEEND)
 Encode a given string in base64 encoding and break lines according to the maximum linelength. More...
 
static encode ($str, $encoding, $EOL=self::LINEEND)
 Encode the given string with the given encoding. More...
 
static mimeDetectCharset ($str)
 Detect MIME charset. More...
 

Public Attributes

const TYPE_OCTETSTREAM = 'application/octet-stream'
 
const TYPE_TEXT = 'text/plain'
 
const TYPE_HTML = 'text/html'
 
const TYPE_ENRICHED = 'text/enriched'
 
const TYPE_XML = 'text/xml'
 
const ENCODING_7BIT = '7bit'
 
const ENCODING_8BIT = '8bit'
 
const ENCODING_QUOTEDPRINTABLE = 'quoted-printable'
 
const ENCODING_BASE64 = 'base64'
 
const DISPOSITION_ATTACHMENT = 'attachment'
 
const DISPOSITION_INLINE = 'inline'
 
const LINELENGTH = 72
 
const LINEEND = "\n"
 
const MULTIPART_ALTERNATIVE = 'multipart/alternative'
 
const MULTIPART_MIXED = 'multipart/mixed'
 
const MULTIPART_RELATED = 'multipart/related'
 
const MULTIPART_RELATIVE = 'multipart/relative'
 
const MULTIPART_REPORT = 'multipart/report'
 
const MESSAGE_RFC822 = 'message/rfc822'
 
const MESSAGE_DELIVERY_STATUS = 'message/delivery-status'
 
const CHARSET_REGEX = '#=\?(?P<charset>[\x21\x23-\x26\x2a\x2b\x2d\x5e\5f\60\x7b-\x7ea-zA-Z0-9]+)\?(?P<encoding>[\x21\x23-\x26\x2a\x2b\x2d\x5e\5f\60\x7b-\x7ea-zA-Z0-9]+)\?(?P<text>[\x21-\x3e\x40-\x7e]+)#'
 

Static Public Attributes

static $qpKeys
 
static $qpReplaceValues
 
static $qpKeysString
 

Protected Attributes

 $boundary
 

Static Protected Attributes

static $makeUnique = 0
 

Detailed Description

Support class for MultiPart Mime Messages.

Definition at line 36 of file Mime.php.

Constructor & Destructor Documentation

Laminas\Mime\Mime::__construct (   $boundary = null)

Constructor.

Parameters
null | string$boundarypublic

Definition at line 628 of file Mime.php.

Member Function Documentation

Laminas\Mime\Mime::boundary ( )

Return a MIME boundary.

public

Returns
string

Definition at line 671 of file Mime.php.

Laminas\Mime\Mime::boundaryLine (   $EOL = self::LINEEND)

Return a MIME boundary line.

Parameters
string$EOLDefaults to LINEEND public
Returns
string

Definition at line 683 of file Mime.php.

static Laminas\Mime\Mime::encode (   $str,
  $encoding,
  $EOL = self::LINEEND 
)
static

Encode the given string with the given encoding.

Parameters
string$str
string$encoding
string$EOLEOL string; defaults to LINEEND
Returns
string

Definition at line 648 of file Mime.php.

static Laminas\Mime\Mime::encodeBase64 (   $str,
  $lineLength = self::LINELENGTH,
  $lineEnd = self::LINEEND 
)
static

Encode a given string in base64 encoding and break lines according to the maximum linelength.

Parameters
string$str
int$lineLengthDefaults to LINELENGTH
string$lineEndDefaults to LINEEND
Returns
string

Definition at line 613 of file Mime.php.

static Laminas\Mime\Mime::encodeBase64Header (   $str,
  $charset,
  $lineLength = self::LINELENGTH,
  $lineEnd = self::LINEEND 
)
static

Encode a given string in mail header compatible base64 encoding.

Parameters
string$str
string$charset
int$lineLengthDefaults to LINELENGTH
string$lineEndDefaults to LINEEND
Returns
string

Definition at line 588 of file Mime.php.

static Laminas\Mime\Mime::encodeQuotedPrintable (   $str,
  $lineLength = self::LINELENGTH,
  $lineEnd = self::LINEEND 
)
static

Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.

Parameters
string$str
int$lineLengthDefaults to LINELENGTH
string$lineEndDefaults to LINEEND
Returns
string

Definition at line 428 of file Mime.php.

static Laminas\Mime\Mime::encodeQuotedPrintableHeader (   $str,
  $charset,
  $lineLength = self::LINELENGTH,
  $lineEnd = self::LINEEND 
)
static

Encode a given string with the QUOTED_PRINTABLE mechanism for Mail Headers.

Mail headers depend on an extended quoted printable algorithm otherwise a range of bugs can occur.

Parameters
string$str
string$charset
int$lineLengthDefaults to LINELENGTH
string$lineEndDefaults to LINEEND
Returns
string

Definition at line 507 of file Mime.php.

static Laminas\Mime\Mime::isPrintable (   $str)
static

Check if the given string is "printable".

Checks that a string contains no unprintable characters. If this returns false, encode the string for secure delivery.

Parameters
string$str
Returns
bool

Definition at line 415 of file Mime.php.

static Laminas\Mime\Mime::mimeDetectCharset (   $str)
static

Detect MIME charset.

Extract parts according to https://tools.ietf.org/html/rfc2047#section-2

Parameters
string$str
Returns
string

Definition at line 708 of file Mime.php.

Laminas\Mime\Mime::mimeEnd (   $EOL = self::LINEEND)

Return MIME ending.

Parameters
string$EOLDefaults to LINEEND public
Returns
string

Definition at line 695 of file Mime.php.

Member Data Documentation

Laminas\Mime\Mime::$boundary
protected

Definition at line 63 of file Mime.php.

Laminas\Mime\Mime::$makeUnique = 0
staticprotected

Definition at line 66 of file Mime.php.

Laminas\Mime\Mime::$qpKeys
static

Definition at line 73 of file Mime.php.

Laminas\Mime\Mime::$qpKeysString
static
Initial value:
=
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"

Definition at line 402 of file Mime.php.

Laminas\Mime\Mime::$qpReplaceValues
static

Definition at line 238 of file Mime.php.

const Laminas\Mime\Mime::CHARSET_REGEX = '#=\?(?P<charset>[\x21\x23-\x26\x2a\x2b\x2d\x5e\5f\60\x7b-\x7ea-zA-Z0-9]+)\?(?P<encoding>[\x21\x23-\x26\x2a\x2b\x2d\x5e\5f\60\x7b-\x7ea-zA-Z0-9]+)\?(?P<text>[\x21-\x3e\x40-\x7e]+)#'

Definition at line 59 of file Mime.php.

const Laminas\Mime\Mime::DISPOSITION_ATTACHMENT = 'attachment'

Definition at line 48 of file Mime.php.

const Laminas\Mime\Mime::DISPOSITION_INLINE = 'inline'

Definition at line 49 of file Mime.php.

const Laminas\Mime\Mime::ENCODING_7BIT = '7bit'

Definition at line 44 of file Mime.php.

const Laminas\Mime\Mime::ENCODING_8BIT = '8bit'

Definition at line 45 of file Mime.php.

const Laminas\Mime\Mime::ENCODING_BASE64 = 'base64'

Definition at line 47 of file Mime.php.

const Laminas\Mime\Mime::ENCODING_QUOTEDPRINTABLE = 'quoted-printable'

Definition at line 46 of file Mime.php.

const Laminas\Mime\Mime::LINEEND = "\n"

Definition at line 51 of file Mime.php.

const Laminas\Mime\Mime::LINELENGTH = 72

Definition at line 50 of file Mime.php.

const Laminas\Mime\Mime::MESSAGE_DELIVERY_STATUS = 'message/delivery-status'

Definition at line 58 of file Mime.php.

const Laminas\Mime\Mime::MESSAGE_RFC822 = 'message/rfc822'

Definition at line 57 of file Mime.php.

const Laminas\Mime\Mime::MULTIPART_ALTERNATIVE = 'multipart/alternative'

Definition at line 52 of file Mime.php.

const Laminas\Mime\Mime::MULTIPART_MIXED = 'multipart/mixed'

Definition at line 53 of file Mime.php.

const Laminas\Mime\Mime::MULTIPART_RELATED = 'multipart/related'

Definition at line 54 of file Mime.php.

const Laminas\Mime\Mime::MULTIPART_RELATIVE = 'multipart/relative'

Definition at line 55 of file Mime.php.

const Laminas\Mime\Mime::MULTIPART_REPORT = 'multipart/report'

Definition at line 56 of file Mime.php.

const Laminas\Mime\Mime::TYPE_ENRICHED = 'text/enriched'

Definition at line 42 of file Mime.php.

const Laminas\Mime\Mime::TYPE_HTML = 'text/html'

Definition at line 41 of file Mime.php.

const Laminas\Mime\Mime::TYPE_OCTETSTREAM = 'application/octet-stream'

Definition at line 39 of file Mime.php.

const Laminas\Mime\Mime::TYPE_TEXT = 'text/plain'

Definition at line 40 of file Mime.php.

const Laminas\Mime\Mime::TYPE_XML = 'text/xml'

Definition at line 43 of file Mime.php.


The documentation for this class was generated from the following file: