class Base64ContentEncoder extendsBase64Encoder implementsContentEncoderInterface

Methods

string
encodeString(string$string,string|null$charset ='utf-8',int$firstLineOffset =0,int$maxLineLength =0)

Takes an unencoded string and produces a Base64 encoded string from it.

iterable
encodeByteStream($stream,int$maxLineLength =0)

Encodes the stream to a Generator.

string
getName()

Gets the MIME name of this content encoding scheme.

Details

string encodeString(string$string,string|null$charset ='utf-8',int$firstLineOffset =0,int$maxLineLength =0)

Takes an unencoded string and produces a Base64 encoded string from it.

Base64 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 $string
string|null $charset
int $firstLineOffset
int $maxLineLength

Return Value

string

iterable encodeByteStream($stream,int$maxLineLength =0)

Encodes the stream to a Generator.

Parameters

$stream
int $maxLineLength

Return Value

iterable

string getName()

Gets the MIME name of this content encoding scheme.

Return Value

string