public function attachContentStream(StreamInterface $stream, $streamCharset = MailMimeParser::DEFAULT_CHARSET)
    {
        if ($this->contentStream !== null && $this->contentStream !== $stream) {
            $this->contentStream->close();
        }
        $this->contentStream = $stream;
        $ch = ($this->charsetOverride !== null) ? $this->charsetOverride : $this->getCharset();
        if ($ch !== null && $streamCharset !== $ch) {
            $this->charsetOverride = $streamCharset;
        }
        $this->ignoreTransferEncoding = true;
        $this->partStreamFilterManager->setStream($stream);
        $this->onChange();
    }
public function attachContentStream(StreamInterface $stream, $streamCharset = MailMimeParser::DEFAULT_CHARSET)
    {
        if ($this->contentStream !== null && $this->contentStream !== $stream) {
            $this->contentStream->close();
        }
        $this->contentStream = $stream;
        $ch = ($this->charsetOverride !== null) ? $this->charsetOverride : $this->getCharset();
        if ($ch !== null && $streamCharset !== $ch) {
            $this->charsetOverride = $streamCharset;
        }
        $this->ignoreTransferEncoding = true;
        $this->partStreamFilterManager->setStream($stream);
        $this->onChange();
    }
public function attachContentStream ( StreamInterface $ stream , $ streamCharset = MailMimeParser :: DEFAULT_CHARSET ) { if ( $ this -> contentStream !== null && $ this -> contentStream !== $ stream ) { $ this -> contentStream -> close ( ) ; } $ this -> contentStream = $ stream ; $ ch = ( $ this -> charsetOverride !== null ) ? $ this -> charsetOverride : $ this -> getCharset ( ) ; if ( $ ch !== null && $ streamCharset !== $ ch ) { $ this -> charsetOverride = $ streamCharset ; } $ this -> ignoreTransferEncoding = true ; $ this -> partStreamFilterManager -> setStream ( $ stream ) ; $ this -> onChange ( ) ; }
Attaches the stream or resource handle for the part's content.  The
stream is closed when another stream is attached, or the MimePart is
destroyed.

@param StreamInterface $stream
@param string $streamCharset
Attaches the stream or resource handle for the part s content . The stream is closed when another stream is attached or the MimePart is destroyed .