= $iLimit) { break; } $sUid = empty($aContact['UID']) ? '' : $aContact['UID']; if (!empty($sUid)) { $sFullName = isset($aContact['FN']) ? \trim($aContact['FN']) : ''; $mEmails = isset($aContact['EMAIL']) ? $aContact['EMAIL'] : ''; if (!\is_array($mEmails)) { $mEmails = array($mEmails); } foreach ($mEmails as $sEmail) { $sEmail = \trim($sEmail); if (!empty($sEmail)) { $iLimit--; $aResult[$sUid] = array($sEmail, $sFullName); } } } } unset($aSearchResult); $aResult = \array_values($aResult); } catch (\Exception $oException) { if ($this->oLogger) { $this->oLogger->WriteException($oException); } } return $aResult; } /** * @param \MailSo\Log\Logger $oLogger */ public function SetLogger($oLogger) { $this->oLogger = $oLogger instanceof \MailSo\Log\Logger ? $oLogger : null; } }