Example #1
0
 public static function GetSoapArrayFromArray($objArray)
 {
     if (!$objArray) {
         return null;
     }
     $objArrayToReturn = array();
     foreach ($objArray as $objObject) {
         array_push($objArrayToReturn, CommunicationList::GetSoapObjectFromObject($objObject, true));
     }
     return unserialize(serialize($objArrayToReturn));
 }
Example #2
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objEmailMessage) {
         $objObject->objEmailMessage = EmailMessage::GetSoapObjectFromObject($objObject->objEmailMessage, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intEmailMessageId = null;
         }
     }
     if ($objObject->objGroup) {
         $objObject->objGroup = Group::GetSoapObjectFromObject($objObject->objGroup, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intGroupId = null;
         }
     }
     if ($objObject->objCommunicationList) {
         $objObject->objCommunicationList = CommunicationList::GetSoapObjectFromObject($objObject->objCommunicationList, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCommunicationListId = null;
         }
     }
     if ($objObject->objLogin) {
         $objObject->objLogin = Login::GetSoapObjectFromObject($objObject->objLogin, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intLoginId = null;
         }
     }
     if ($objObject->objCommunicationListEntry) {
         $objObject->objCommunicationListEntry = CommunicationListEntry::GetSoapObjectFromObject($objObject->objCommunicationListEntry, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCommunicationListEntryId = null;
         }
     }
     if ($objObject->objPerson) {
         $objObject->objPerson = Person::GetSoapObjectFromObject($objObject->objPerson, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intPersonId = null;
         }
     }
     return $objObject;
 }