function QpContentEncoder::encodeByteStream
Overrides ContentEncoderInterface::encodeByteStream
File
-
vendor/
symfony/ mime/ Encoder/ QpContentEncoder.php, line 19
Class
- QpContentEncoder
- @author Lars Strojny
Namespace
Symfony\Component\Mime\EncoderCode
public function encodeByteStream($stream, int $maxLineLength = 0) : iterable {
if (!\is_resource($stream)) {
throw new \TypeError(\sprintf('Method "%s" takes a stream as a first argument.', __METHOD__));
}
// we don't use PHP stream filters here as the content should be small enough
(yield $this->encodeString(stream_get_contents($stream), 'utf-8', 0, $maxLineLength));
}