Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. QpContentEncoder.php

function QpContentEncoder::encodeByteStream

Overrides ContentEncoderInterface::encodeByteStream

File

vendor/symfony/mime/Encoder/QpContentEncoder.php, line 19

Class

QpContentEncoder
@author Lars Strojny

Namespace

Symfony\Component\Mime\Encoder

Code

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));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal