partHeaderContainerFactory = $partHeaderContainerFactory; $this->partChildrenContainerFactory = $partChildrenContainerFactory; } /** * Constructs a new IMimePart object and returns it * * @return \ZBateson\MailMimeParser\Message\IMimePart */ public function newInstance() { $streamContainer = $this->partStreamContainerFactory->newInstance(); $headerContainer = $this->partHeaderContainerFactory->newInstance(); $part = new MimePart( null, $streamContainer, $headerContainer, $this->partChildrenContainerFactory->newInstance() ); $streamContainer->setStream($this->streamFactory->newMessagePartStream($part)); return $part; } }