mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 15:07:02 +03:00
Cleanup & Speedup *Collection objects
This commit is contained in:
parent
f6fdb69c65
commit
ebfde6e360
12 changed files with 169 additions and 209 deletions
|
|
@ -27,6 +27,11 @@ class PartCollection extends \MailSo\Base\Collection
|
|||
return new self();
|
||||
}
|
||||
|
||||
public function append(Part $oPart, bool $bToTop = false) : void
|
||||
{
|
||||
parent::append($oPart, $bToTop);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return resource
|
||||
*/
|
||||
|
|
@ -37,12 +42,12 @@ class PartCollection extends \MailSo\Base\Collection
|
|||
{
|
||||
$aResult = array();
|
||||
|
||||
foreach ($this as /* @var $oPart \MailSo\Mime\Part */ $oPart)
|
||||
foreach ($this as $oPart)
|
||||
{
|
||||
if (0 < count($aResult))
|
||||
{
|
||||
$aResult[] = \MailSo\Mime\Enumerations\Constants::CRLF.
|
||||
'--'.$sBoundary.\MailSo\Mime\Enumerations\Constants::CRLF;
|
||||
$aResult[] = Enumerations\Constants::CRLF.
|
||||
'--'.$sBoundary.Enumerations\Constants::CRLF;
|
||||
}
|
||||
|
||||
$aResult[] = $oPart->ToStream();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue