Handles Quoted Printable (QP) Encoding in Swift Mailer.

Possibly the most accurate RFC 2045 QP implementation found in PHP.

package Swift
subpackage Encoder
author Chris Corbyn

 Methods

Creates a new QpEncoder for the given CharacterStream.

__construct(\Swift_CharacterStream $charStream, \Swift_StreamFilter $filter) 

Parameters

$charStream

\Swift_CharacterStream

to use for reading characters

$filter

\Swift_StreamFilter

if input should be canonicalized

__sleep()

__sleep() 

__wakeup()

__wakeup() 

Updates the charset used.

charsetChanged(string $charset) 

Parameters

$charset

string

Takes an unencoded string and produces a QP encoded string from it.

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

QP encoded strings have a maximum line length of 76 characters. If the first line needs to be shorter, indicate the difference with $firstLineOffset.

Parameters

$string

string

to encode

$firstLineOffset

$maxLineLength

Returns

string

Encode the given byte array into a verbatim QP form.

_encodeByteSequence(array $bytes, $size) : string
access protected

Parameters

$bytes

int[]

$size

Returns

string

Get the next sequence of bytes to read from the char stream.

_nextSequence(int $size) : int[]
access protected

Parameters

$size

int

number of bytes to read

Returns

int[]

Make sure CRLF is correct and HT/SPACE are in valid places.

_standardize(string $string) : string
access protected

Parameters

$string

string

Returns

string

getSafeMapShareId()

getSafeMapShareId() 

initSafeMap()

initSafeMap() 

 Properties

 

$_charStream : \Swift_CharacterStream
access protected
 

$_filter : \Swift_StreamFilter
access protected
 

$_qpMap : string[]
access protected
 

$_safeMap : string[]
access protected
 

$_safeMapShare