Handles binary/7/8-bit Transfer Encoding in Swift Mailer.

package Swift
subpackage Mime
author Chris Corbyn

 Methods

Creates a new PlainContentEncoder with $name (probably 7bit or 8bit).

__construct(string $name, boolean $canonical) 

Parameters

$name

string

$canonical

boolean

If canonicalization transformation should be done.

Not used.

charsetChanged(string $charset) 

Parameters

$charset

string

Encode stream $in to stream $out.

encodeByteStream(\Swift_OutputByteStream $os, \Swift_InputByteStream $is, $firstLineOffset, $maxLineLength) 

Parameters

$os

$is

$firstLineOffset

$maxLineLength

Encode a given string to produce an encoded string.

encodeString(string $string, $firstLineOffset, int $maxLineLength) : string

Parameters

$string

string

$firstLineOffset

$maxLineLength

int
  • 0 means no wrapping will occur

Returns

string

Get the name of this encoding scheme.

getName() : string

Returns

string

Canonicalize string input (fix CRLF).

_canonicalize(string $string) : string
access private

Parameters

$string

string

Returns

string

A safer (but weaker) wordwrap for unicode.

_safeWordwrap(string $string, int $length, string $le) : string
access private

Parameters

$string

string

$length

int

$le

string

Returns

string

 Properties

 

$_canonical : boolean
access private
 

$_name : string
access private