本文整理匯總了PHP中MailSo\Base\Utils::PrepearFetchSequence方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utils::PrepearFetchSequence方法的具體用法?PHP Utils::PrepearFetchSequence怎麽用?PHP Utils::PrepearFetchSequence使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MailSo\Base\Utils
的用法示例。
在下文中一共展示了Utils::PrepearFetchSequence方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: MessageListByRequestIndexOrUids
/**
* @param \MailSo\Mail\MessageCollection &$oMessageCollection
* @param array $aRequestIndexOrUids
* @param bool $bIndexAsUid
* @param bool $bSimple = false
*
* @throws \MailSo\Net\Exceptions\Exception
* @throws \MailSo\Imap\Exceptions\Exception
*/
public function MessageListByRequestIndexOrUids(&$oMessageCollection, $aRequestIndexOrUids, $bIndexAsUid, $bSimple = false)
{
if (\is_array($aRequestIndexOrUids) && 0 < \count($aRequestIndexOrUids)) {
$aFetchResponse = $this->oImapClient->Fetch(array(\MailSo\Imap\Enumerations\FetchType::INDEX, \MailSo\Imap\Enumerations\FetchType::UID, \MailSo\Imap\Enumerations\FetchType::RFC822_SIZE, \MailSo\Imap\Enumerations\FetchType::INTERNALDATE, \MailSo\Imap\Enumerations\FetchType::FLAGS, \MailSo\Imap\Enumerations\FetchType::BODYSTRUCTURE, $bSimple ? $this->getEnvelopeOrHeadersRequestStringForSimpleList() : $this->getEnvelopeOrHeadersRequestString()), \MailSo\Base\Utils::PrepearFetchSequence($aRequestIndexOrUids), $bIndexAsUid);
if (\is_array($aFetchResponse) && 0 < \count($aFetchResponse)) {
$aFetchIndexArray = array();
$oFetchResponseItem = null;
foreach ($aFetchResponse as &$oFetchResponseItem) {
$aFetchIndexArray[$bIndexAsUid ? $oFetchResponseItem->GetFetchValue(\MailSo\Imap\Enumerations\FetchType::UID) : $oFetchResponseItem->GetFetchValue(\MailSo\Imap\Enumerations\FetchType::INDEX)] =& $oFetchResponseItem;
unset($oFetchResponseItem);
}
foreach ($aRequestIndexOrUids as $iFUid) {
if (isset($aFetchIndexArray[$iFUid])) {
$oMessageCollection->Add(Message::NewFetchResponseInstance($oMessageCollection->FolderName, $aFetchIndexArray[$iFUid]));
}
}
}
}
}