Esempio n. 1
0
 /**
  * @return array
  */
 public function AjaxMessagesGetBodies()
 {
     $sFolderFullNameRaw = (string) $this->getParamValue('Folder', '');
     $aUids = $this->getParamValue('Uids', null);
     if (0 === strlen(trim($sFolderFullNameRaw)) || !is_array($aUids) || 0 === count($aUids)) {
         throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::InvalidInputParameter);
     }
     $oAccount = $this->getAccountFromParam();
     $aList = array();
     foreach ($aUids as $iUid) {
         if (is_numeric($iUid)) {
             $oMessage = $this->oApiMail->getMessage($oAccount, $sFolderFullNameRaw, (int) $iUid, '', true, true, 600000);
             if ($oMessage instanceof \CApiMailMessage) {
                 $aList[] = $oMessage;
             }
             unset($oMessage);
         }
     }
     return $this->DefaultResponse($oAccount, __FUNCTION__, $aList);
 }