XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Encoder_QpEncoder Class Reference
Inheritance diagram for Swift_Encoder_QpEncoder:
Inheritance graph

Public Member Functions

 __construct (Swift_CharacterStream $charStream, Swift_StreamFilter $filter=null)
 
 charsetChanged ($charset)
 
 encodeString ($string, $firstLineOffset=0, $maxLineLength=0)
 

Protected Member Functions

 _encodeByteSequence (array $bytes, &$size)
 
 _nextSequence ($size=4)
 
 _standardize ($string)
 

Protected Attributes

 $_charStream
 
 $_filter
 

Static Protected Attributes

static $_qpMap
 
static $_safeMap = array()
 

Detailed Description

Definition at line 21 of file QpEncoder.php.

Constructor & Destructor Documentation

Swift_Encoder_QpEncoder::__construct ( Swift_CharacterStream  $charStream,
Swift_StreamFilter  $filter = null 
)

Creates a new QpEncoder for the given CharacterStream.

Parameters
Swift_CharacterStream$charStreamto use for reading characters
Swift_StreamFilter$filterif input should be canonicalized

Definition at line 110 of file QpEncoder.php.

Member Function Documentation

Swift_Encoder_QpEncoder::_encodeByteSequence ( array  $bytes,
$size 
)
protected

Encode the given byte array into a verbatim QP form.

Parameters
int[]$bytes
Returns
string protected

Definition at line 212 of file QpEncoder.php.

References $ret.

Referenced by Swift_Mime_ContentEncoder_QpContentEncoder\encodeByteStream(), and encodeString().

Here is the caller graph for this function:

Swift_Encoder_QpEncoder::_nextSequence (   $size = 4)
protected

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

Parameters
int$sizenumber of bytes to read
Returns
int[] protected

Definition at line 238 of file QpEncoder.php.

Referenced by Swift_Mime_ContentEncoder_QpContentEncoder\encodeByteStream(), and encodeString().

Here is the caller graph for this function:

Swift_Encoder_QpEncoder::_standardize (   $string)
protected

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

Parameters
string$string
Returns
string protected

Definition at line 249 of file QpEncoder.php.

Referenced by Swift_Mime_ContentEncoder_QpContentEncoder\encodeByteStream(), and encodeString().

Here is the caller graph for this function:

Swift_Encoder_QpEncoder::charsetChanged (   $charset)

Updates the charset used.

Parameters
string$charset

Implements Swift_Mime_CharsetObserver.

Definition at line 199 of file QpEncoder.php.

Swift_Encoder_QpEncoder::encodeString (   $string,
  $firstLineOffset = 0,
  $maxLineLength = 0 
)

Takes an unencoded string and produces a QP encoded string from it. 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$stringto encode
int$firstLineOffset,optional
int$maxLineLength,optional,0indicates the default of 76 chars
Returns
string

Implements Swift_Encoder.

Definition at line 135 of file QpEncoder.php.

References _encodeByteSequence(), _nextSequence(), and _standardize().

Here is the call graph for this function:

Member Data Documentation

Swift_Encoder_QpEncoder::$_charStream
protected

Definition at line 29 of file QpEncoder.php.

Swift_Encoder_QpEncoder::$_filter
protected

Definition at line 36 of file QpEncoder.php.

Swift_Encoder_QpEncoder::$_qpMap
staticprotected

Definition at line 43 of file QpEncoder.php.

Swift_Encoder_QpEncoder::$_safeMap = array()
staticprotected

Definition at line 103 of file QpEncoder.php.


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