mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-11 17:28:04 +08:00
38 lines
585 B
PHP
38 lines
585 B
PHP
<?php
|
|
|
|
namespace MailSo\Mail;
|
|
|
|
/**
|
|
* @category MailSo
|
|
* @package Mail
|
|
*/
|
|
class AttachmentCollection extends \MailSo\Base\Collection
|
|
{
|
|
/**
|
|
* @access protected
|
|
*/
|
|
protected function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* @return \MailSo\Mail\AttachmentCollection
|
|
*/
|
|
public static function NewInstance()
|
|
{
|
|
return new self();
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function InlineCount()
|
|
{
|
|
$aList = $this->FilterList(function ($oAttachment) {
|
|
return $oAttachment && $oAttachment->IsInline();
|
|
});
|
|
|
|
return \is_array($aList) ? \count($aList) : 0;
|
|
}
|
|
}
|