<?php
namespace ZBateson\MailMimeParser\Message\Factory;
use Psr\Log\LoggerInterface;
use ZBateson\MailMimeParser\Message\PartStreamContainer;
use ZBateson\MailMimeParser\Stream\StreamFactory;
use ZBateson\MbWrapper\MbWrapper;
class PartStreamContainerFactory
{
public function __construct(
protected readonly LoggerInterface $logger,
protected readonly StreamFactory $streamFactory,
protected readonly MbWrapper $mbWrapper,
protected readonly bool $throwExceptionReadingPartContentFromUnsupportedCharsets
) {
}
public function newInstance() : PartStreamContainer
{
return new PartStreamContainer(
$this->logger,
$this->streamFactory,
$this->mbWrapper,
$this->throwExceptionReadingPartContentFromUnsupportedCharsets
);
}
}