PHP Class Swift_Mime_ContentEncoder_PlainContentEncoder, Halite

Author: Chris Corbyn
Inheritance: implements Swift_Mime_ContentEncoder
Show file Open project: HaliteChallenge/Halite

Public Methods

Method Description
__construct ( string $name, boolean $canonical = false ) Creates a new PlainContentEncoder with $name (probably 7bit or 8bit).
charsetChanged ( $charset ) Not used.
encodeByteStream ( Swift_OutputByteStream $os, Swift_InputByteStream $is, integer $firstLineOffset, integer $maxLineLength ) Encode stream $in to stream $out.
encodeString ( string $string, integer $firstLineOffset, integer $maxLineLength ) : string Encode a given string to produce an encoded string.
getName ( ) : string Get the name of this encoding scheme.

Private Methods

Method Description
_canonicalize ( string $string ) : string Canonicalize string input (fix CRLF).
_safeWordwrap ( string $string, integer $length = 75, string $le = " " ) : string A safer (but weaker) wordwrap for unicode.

Method Details

__construct() public method

Creates a new PlainContentEncoder with $name (probably 7bit or 8bit).
public __construct ( string $name, boolean $canonical = false )
$name string
$canonical boolean If canonicalization transformation should be done.

charsetChanged() public method

Not used.
public charsetChanged ( $charset )

encodeByteStream() public method

Encode stream $in to stream $out.
public encodeByteStream ( Swift_OutputByteStream $os, Swift_InputByteStream $is, integer $firstLineOffset, integer $maxLineLength )
$os Swift_OutputByteStream
$is Swift_InputByteStream
$firstLineOffset integer ignored
$maxLineLength integer optional, 0 means no wrapping will occur

encodeString() public method

Encode a given string to produce an encoded string.
public encodeString ( string $string, integer $firstLineOffset, integer $maxLineLength ) : string
$string string
$firstLineOffset integer ignored
$maxLineLength integer - 0 means no wrapping will occur
return string

getName() public method

Get the name of this encoding scheme.
public getName ( ) : string
return string