Base64ContentEncoder
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.
from Base64Encoder
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.