Swift_Mime_ContentEncoder_PlainContentEncoder
in package
implements
Swift_Mime_ContentEncoder
Handles binary/7/8-bit Transfer Encoding in Swift Mailer.
When sending 8-bit content over SMTP, you should use Swift_Transport_Esmtp_EightBitMimeHandler to enable the 8BITMIME SMTP extension.
Tags
Interfaces, Classes and Traits
- Swift_Mime_ContentEncoder
- Interface for all Transfer Encoding schemes.
Table of Contents
- $canonical : bool
- True if canonical transformations should be done.
- $name : string
- The name of this encoding scheme (probably 7bit or 8bit).
- __construct() : mixed
- Creates a new PlainContentEncoder with $name (probably 7bit or 8bit).
- charsetChanged() : mixed
- Not used.
- encodeByteStream() : mixed
- Encode stream $in to stream $out.
- encodeString() : string
- Encode a given string to produce an encoded string.
- getName() : string
- Get the name of this encoding scheme.
- canonicalize() : string
- Canonicalize string input (fix CRLF).
- safeWordwrap() : string
- A safer (but weaker) wordwrap for unicode.
Properties
$canonical
True if canonical transformations should be done.
private
bool
$canonical
$name
The name of this encoding scheme (probably 7bit or 8bit).
private
string
$name
Methods
__construct()
Creates a new PlainContentEncoder with $name (probably 7bit or 8bit).
public
__construct(string $name[, bool $canonical = false ]) : mixed
Parameters
- $name : string
- $canonical : bool = false
-
If canonicalization transformation should be done.
Return values
mixed —charsetChanged()
Not used.
public
charsetChanged(mixed $charset) : mixed
Parameters
- $charset : mixed
Return values
mixed —encodeByteStream()
Encode stream $in to stream $out.
public
encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, int $firstLineOffset, int $maxLineLength) : mixed
Parameters
- $os : Swift_OutputByteStream
-
to read from
- $is : Swift_InputByteStream
-
to write to
- $firstLineOffset : int
-
ignored
- $maxLineLength : int
-
optional, 0 means no wrapping will occur
Return values
mixed —encodeString()
Encode a given string to produce an encoded string.
public
encodeString(string $string, int $firstLineOffset, int $maxLineLength) : string
Parameters
- $string : string
- $firstLineOffset : int
-
ignored
- $maxLineLength : int
-
- 0 means no wrapping will occur
Return values
string —getName()
Get the name of this encoding scheme.
public
getName() : string
Return values
string —canonicalize()
Canonicalize string input (fix CRLF).
private
canonicalize(string $string) : string
Parameters
- $string : string
Return values
string —safeWordwrap()
A safer (but weaker) wordwrap for unicode.
private
safeWordwrap(string $string[, int $length = 75 ][, string $le = "
" ]) : string
Parameters
- $string : string
- $length : int = 75
- $le : string = " "