v1.2.12.435

This commit is contained in:
RainLoop Team 2013-10-11 01:56:33 +04:00
parent 513936e5f7
commit 93e620e3de
399 changed files with 765 additions and 687 deletions

View file

@ -0,0 +1,62 @@
<?php
namespace MailSo\Mime;
/**
* @category MailSo
* @package Mime
*/
class AttachmentCollection extends \MailSo\Base\Collection
{
/**
* @access protected
*/
protected function __construct()
{
parent::__construct();
}
/**
* @return \MailSo\Mime\AttachmentCollection
*/
public static function NewInstance()
{
return new self();
}
/**
* @return array
*/
public function LinkedAttachments()
{
return $this->FilterList(function ($oItem) {
return $oItem && $oItem->IsLinked();
});
}
/**
* @return array
*/
public function UnlinkedAttachments()
{
return $this->FilterList(function ($oItem) {
return $oItem && !$oItem->IsLinked();
});
}
/**
* @return int
*/
public function SizeOfAttachments()
{
$iResult = 0;
$this->ForeachList(function ($oItem) use (&$iResult) {
if ($oItem)
{
$iResult += $oItem->FileSize();
}
});
return $iResult;
}
}