<?php
namespace ZBateson\MailMimeParser\Parser\Part;
use Psr\Log\LoggerInterface;
use ZBateson\MailMimeParser\Header\HeaderFactory;
class UUEncodedPartHeaderContainerFactory
{
protected LoggerInterface $logger;
protected HeaderFactory $headerFactory;
public function __construct(LoggerInterface $logger, HeaderFactory $headerFactory)
{
$this->logger = $logger;
$this->headerFactory = $headerFactory;
}
public function newInstance(int $mode, string $filename) : UUEncodedPartHeaderContainer
{
$container = new UUEncodedPartHeaderContainer($this->logger, $this->headerFactory);
$container->setUnixFileMode($mode);
$container->setFilename($filename);
return $container;
}
}