mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-10 01:47:03 +03:00
v1.3.1.444
This commit is contained in:
parent
b0cf81c3f7
commit
45ca5e33ca
401 changed files with 47 additions and 46 deletions
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace MailSo\Mime\Parser;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
* @package Mime
|
||||
* @subpackage Parser
|
||||
*/
|
||||
class ParserEmpty implements ParserInterface
|
||||
{
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oPart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function StartParse(\MailSo\Mime\Part &$oPart)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oPart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function EndParse(\MailSo\Mime\Part &$oPart)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oPart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function StartParseMimePart(\MailSo\Mime\Part &$oPart)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oMimePart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function EndParseMimePart(\MailSo\Mime\Part &$oPart)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function InitMimePartHeader()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sBuffer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function ReadBuffer($sBuffer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sBuffer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function WriteBody($sBuffer)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace MailSo\Mime\Parser;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
* @package Mime
|
||||
* @subpackage Parser
|
||||
*/
|
||||
interface ParserInterface
|
||||
{
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oPart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function StartParse(\MailSo\Mime\Part &$oPart);
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oPart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function EndParse(\MailSo\Mime\Part &$oPart);
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oPart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function StartParseMimePart(\MailSo\Mime\Part &$oPart);
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oMimePart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function EndParseMimePart(\MailSo\Mime\Part &$oPart);
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function InitMimePartHeader();
|
||||
|
||||
/**
|
||||
* @param string $sBuffer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function ReadBuffer($sBuffer);
|
||||
|
||||
/**
|
||||
* @param string $sBuffer
|
||||
* @return void
|
||||
*/
|
||||
public function WriteBody($sBuffer);
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace MailSo\Mime\Parser;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
* @package Mime
|
||||
* @subpackage Parser
|
||||
*/
|
||||
class ParserMemory extends ParserEmpty implements ParserInterface
|
||||
{
|
||||
/**
|
||||
* @var \MailSo\Mime\Part
|
||||
*/
|
||||
protected $oCurrentMime = null;
|
||||
|
||||
/**
|
||||
* @param \MailSo\Mime\Part $oMimePart
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function StartParseMimePart(\MailSo\Mime\Part &$oPart)
|
||||
{
|
||||
$this->oCurrentMime = $oPart;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sBuffer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function WriteBody($sBuffer)
|
||||
{
|
||||
if (null === $this->oCurrentMime->Body)
|
||||
{
|
||||
$this->oCurrentMime->Body = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
|
||||
}
|
||||
|
||||
if (\is_resource($this->oCurrentMime->Body))
|
||||
{
|
||||
\fwrite($this->oCurrentMime->Body, $sBuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue