Handles Quoted Printable (QP) Transfer Encoding in Swift Mailer.

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

package Swift
subpackage Mime
author Chris Corbyn

 Methods

Creates a new QpContentEncoder for the given CharacterStream.

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

Parameters

$charStream

\Swift_CharacterStream

to use for reading characters

$filter

\Swift_StreamFilter

if canonicalization should occur

$dotEscape

boolean

if dot stuffing workaround must be enabled

__sleep()

__sleep() 

__wakeup()

__wakeup() 
Inherited
inherited_from \Swift_Encoder_QpEncoder::__wakeup()

Notify this observer that the entity's charset has changed.

charsetChanged(string $charset) 
Inherited
inherited_from \Swift_Mime_CharsetObserver::charsetChanged()
inherited_from \Swift_Encoder::charsetChanged()
inherited_from \Swift_Mime_ContentEncoder::charsetChanged()

Parameters

$charset

string

Encode stream $in to stream $out.

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

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

$os

\Swift_OutputByteStream

output stream

$is

\Swift_InputByteStream

input stream

$firstLineOffset

int

$maxLineLength

int

Encode a given string to produce an encoded string.

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

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

inherited_from \Swift_Encoder::encodeString()
inherited_from \Swift_Mime_ContentEncoder::encodeString()

Parameters

$string

string

$firstLineOffset

int

if first line needs to be shorter

$maxLineLength

int
  • 0 indicates the default length for this encoding

Returns

string

Get the name of this encoding scheme.

getName() : string

Returns the string 'quoted-printable'.

Returns

string

Encode the given byte array into a verbatim QP form.

_encodeByteSequence(array $bytes, $size) : string
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::_encodeByteSequence()

Parameters

$bytes

int[]

$size

Returns

string

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

_nextSequence(int $size) : int[]
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::_nextSequence()

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
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::_standardize()

Parameters

$string

string

Returns

string

getSafeMapShareId()

getSafeMapShareId() 

initSafeMap()

initSafeMap() 

 Properties

 

$_charStream : \Swift_CharacterStream
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::$$_charStream
 

$_dotEscape 
 

$_filter : \Swift_StreamFilter
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::$$_filter
 

$_qpMap : string[]
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::$$_qpMap
 

$_safeMap : string[]
Inherited
access protected
inherited_from \Swift_Encoder_QpEncoder::$$_safeMap
 

$_safeMapShare 
Inherited
inherited_from \Swift_Encoder_QpEncoder::$$_safeMapShare