mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Changed: MailSo\*Collection now extends \ArrayObject
Changed: fixed __constructor param type hinting Replace: &$o with $o as objects don't need & referencing
This commit is contained in:
parent
9bb44e7f98
commit
f6fdb69c65
30 changed files with 290 additions and 736 deletions
|
|
@ -1502,7 +1502,7 @@ class MailClient
|
|||
{
|
||||
$aFetchIndexArray = array();
|
||||
$oFetchResponseItem = null;
|
||||
foreach ($aFetchResponse as /* @var $oFetchResponseItem \MailSo\Imap\FetchResponse */ &$oFetchResponseItem)
|
||||
foreach ($aFetchResponse as /* @var $oFetchResponseItem \MailSo\Imap\FetchResponse */ $oFetchResponseItem)
|
||||
{
|
||||
$aFetchIndexArray[($bIndexAsUid)
|
||||
? $oFetchResponseItem->GetFetchValue(\MailSo\Imap\Enumerations\FetchType::UID)
|
||||
|
|
@ -1515,7 +1515,7 @@ class MailClient
|
|||
{
|
||||
if (isset($aFetchIndexArray[$iFUid]))
|
||||
{
|
||||
$oMessageCollection->Add(
|
||||
$oMessageCollection->append(
|
||||
Message::NewFetchResponseInstance(
|
||||
$oMessageCollection->FolderName, $aFetchIndexArray[$iFUid]));
|
||||
}
|
||||
|
|
@ -1534,28 +1534,6 @@ class MailClient
|
|||
$this->oImapClient->IsSupported('THREAD=ORDEREDSUBJECT');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function MessageListSimple(string $sFolderName, array $aUids) : \MailSo\Mail\MessageCollection
|
||||
{
|
||||
if (0 === \strlen($sFolderName) || !\MailSo\Base\Validator::NotEmptyArray($aUids))
|
||||
{
|
||||
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
|
||||
}
|
||||
|
||||
$this->oImapClient->FolderExamine($sFolderName);
|
||||
|
||||
$oMessageCollection = \MailSo\Mail\MessageCollection::NewInstance();
|
||||
$oMessageCollection->FolderName = $sFolderName;
|
||||
|
||||
$this->MessageListByRequestIndexOrUids($oMessageCollection, $aUids, true, true);
|
||||
|
||||
return $oMessageCollection->GetAsArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue