mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Uploading and preparing the repository to the dev version.
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
This commit is contained in:
parent
afad45137e
commit
4cc2207513
846 changed files with 99453 additions and 2123 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue