PHP 클래스 Swift_Encoder_QpEncoder, Halite

Possibly the most accurate RFC 2045 QP implementation found in PHP.
저자: Chris Corbyn
상속: implements Swift_Encoder
파일 보기 프로젝트 열기: HaliteChallenge/Halite 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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