Base64ContentEncoder
extends Base64Encoder
in package
implements
ContentEncoderInterface
Tags
Interfaces, Classes, Traits and Enums
Table of Contents
- encodeByteStream() : iteratable<string|int, mixed>
- Encodes the stream to a Generator.
- encodeString() : string
- Takes an unencoded string and produces a Base64 encoded string from it.
- getName() : string
- Gets the MIME name of this content encoding scheme.
Methods
encodeByteStream()
Encodes the stream to a Generator.
public
encodeByteStream(mixed $stream, int $maxLineLength) : iteratable<string|int, mixed>
Parameters
- $stream : mixed
- $maxLineLength : int
Return values
iteratable<string|int, mixed> —encodeString()
Takes an unencoded string and produces a Base64 encoded string from it.
public
encodeString(string $string[, string|null $charset = 'utf-8' ], int $firstLineOffset, int $maxLineLength) : string
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
- $charset : string|null = 'utf-8'
- $firstLineOffset : int
-
if first line needs to be shorter
- $maxLineLength : int
-
- 0 indicates the default length for this encoding
Return values
string —getName()
Gets the MIME name of this content encoding scheme.
public
getName() : string