38 if (0 >= $maxLineLength || 76 < $maxLineLength)
45 while (
false !== $bytes = $os->
read(8190))
47 $encoded = base64_encode($bytes);
48 $encodedTransformed =
'';
49 $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset;
51 while ($thisMaxLineLength < strlen($encoded))
53 $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) .
"\r\n";
55 $encoded = substr($encoded, $thisMaxLineLength);
56 $thisMaxLineLength = $maxLineLength;
60 if (0 < $remainingLength = strlen($encoded))
62 $remainder += $remainingLength;
63 $encodedTransformed .= $encoded;
67 $is->
write($encodedTransformed);