PHP Класс Swift_Encoder_QpEncoder, Halite

Possibly the most accurate RFC 2045 QP implementation found in PHP.
Автор: Chris Corbyn
Наследование: implements Swift_Encoder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_charStream Swift_CharacterStream The CharacterStream used for reading characters (as opposed to bytes).
$_filter Swift_StreamFilter A filter used if input should be canonicalized.
$_qpMap string[] Pre-computed QP for HUGE optimization.
$_safeMap string[] A map of non-encoded ascii characters.
$_safeMapShare

Открытые методы

Метод Описание
__clone ( ) Make a deep copy of object.
__construct ( Swift_CharacterStream $charStream, Swift_StreamFilter $filter = null ) Creates a new QpEncoder for the given CharacterStream.
__sleep ( )
__wakeup ( )
charsetChanged ( string $charset ) Updates the charset used.
encodeString ( string $string, $firstLineOffset, $maxLineLength ) : string Takes an unencoded string and produces a QP encoded string from it.

Защищенные методы

Метод Описание
_encodeByteSequence ( array $bytes, integer &$size ) : string Encode the given byte array into a verbatim QP form.
_nextSequence ( integer $size = 4 ) : integer[] Get the next sequence of bytes to read from the char stream.
_standardize ( string $string ) : string Make sure CRLF is correct and HT/SPACE are in valid places.
getSafeMapShareId ( )
initSafeMap ( )

Описание методов

__clone() публичный Метод

Make a deep copy of object.
public __clone ( )

__construct() публичный Метод

Creates a new QpEncoder for the given CharacterStream.
public __construct ( Swift_CharacterStream $charStream, Swift_StreamFilter $filter = null )
$charStream Swift_CharacterStream to use for reading characters
$filter Swift_StreamFilter if input should be canonicalized

__sleep() публичный Метод

public __sleep ( )

__wakeup() публичный Метод

public __wakeup ( )

_encodeByteSequence() защищенный Метод

Encode the given byte array into a verbatim QP form.
protected _encodeByteSequence ( array $bytes, integer &$size ) : string
$bytes array
$size integer
Результат string

_nextSequence() защищенный Метод

Get the next sequence of bytes to read from the char stream.
protected _nextSequence ( integer $size = 4 ) : integer[]
$size integer number of bytes to read
Результат integer[]

_standardize() защищенный Метод

Make sure CRLF is correct and HT/SPACE are in valid places.
protected _standardize ( string $string ) : string
$string string
Результат string

charsetChanged() публичный Метод

Updates the charset used.
public charsetChanged ( string $charset )
$charset string

encodeString() публичный Метод

QP encoded strings have a maximum line length of 76 characters. If the first line needs to be shorter, indicate the difference with $firstLineOffset.
public encodeString ( string $string, $firstLineOffset, $maxLineLength ) : string
$string string to encode
Результат string

getSafeMapShareId() защищенный Метод

protected getSafeMapShareId ( )

initSafeMap() защищенный Метод

protected initSafeMap ( )

Описание свойств

$_charStream защищенное свойство

The CharacterStream used for reading characters (as opposed to bytes).
protected Swift_CharacterStream $_charStream
Результат Swift_CharacterStream

$_filter защищенное свойство

A filter used if input should be canonicalized.
protected Swift_StreamFilter $_filter
Результат Swift_StreamFilter

$_qpMap защищенное статическое свойство

Pre-computed QP for HUGE optimization.
protected static string[] $_qpMap
Результат string[]

$_safeMap защищенное свойство

A map of non-encoded ascii characters.
protected string[] $_safeMap
Результат string[]

$_safeMapShare защищенное статическое свойство

protected static $_safeMapShare