public function newInstance(PartBuilder $partBuilder, StreamInterface $stream = null)
    {
        $contentStream = null;
        if ($stream !== null) {
            $contentStream = $this->streamFactory->getLimitedContentStream($stream, $partBuilder);
        }
        return new Message(
            $this->partStreamFilterManagerFactory->newInstance(),
            $this->streamFactory,
            $this->partFilterFactory,
            $partBuilder,
            $this->messageHelperService,
            $stream,
            $contentStream
        );
    }
public function newInstance(PartBuilder $partBuilder, StreamInterface $stream = null)
    {
        $contentStream = null;
        if ($stream !== null) {
            $contentStream = $this->streamFactory->getLimitedContentStream($stream, $partBuilder);
        }
        return new Message(
            $this->partStreamFilterManagerFactory->newInstance(),
            $this->streamFactory,
            $this->partFilterFactory,
            $partBuilder,
            $this->messageHelperService,
            $stream,
            $contentStream
        );
    }
public function newInstance ( PartBuilder $ partBuilder , StreamInterface $ stream = null ) { $ contentStream = null ; if ( $ stream !== null ) { $ contentStream = $ this -> streamFactory -> getLimitedContentStream ( $ stream , $ partBuilder ) ; } return new Message ( $ this -> partStreamFilterManagerFactory -> newInstance ( ) , $ this -> streamFactory , $ this -> partFilterFactory , $ partBuilder , $ this -> messageHelperService , $ stream , $ contentStream ) ; }
Constructs a new Message object and returns it

@param PartBuilder $partBuilder
@param StreamInterface $stream
@return \ZBateson\MailMimeParser\Message\Part\MimePart
Constructs a new Message object and returns it