Exemplo n.º 1
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objSuggestion) {
         $objObject->objSuggestion = NarroSuggestion::GetSoapObjectFromObject($objObject->objSuggestion, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intSuggestionId = null;
         }
     }
     if ($objObject->objContext) {
         $objObject->objContext = NarroContext::GetSoapObjectFromObject($objObject->objContext, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intContextId = null;
         }
     }
     if ($objObject->objUser) {
         $objObject->objUser = NarroUser::GetSoapObjectFromObject($objObject->objUser, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intUserId = null;
         }
     }
     if ($objObject->dttCreated) {
         $objObject->dttCreated = $objObject->dttCreated->qFormat(QDateTime::FormatSoap);
     }
     if ($objObject->dttModified) {
         $objObject->dttModified = $objObject->dttModified->qFormat(QDateTime::FormatSoap);
     }
     return $objObject;
 }
Exemplo n.º 2
0
 public static function GetSoapArrayFromArray($objArray)
 {
     if (!$objArray) {
         return null;
     }
     $objArrayToReturn = array();
     foreach ($objArray as $objObject) {
         array_push($objArrayToReturn, NarroContext::GetSoapObjectFromObject($objObject, true));
     }
     return unserialize(serialize($objArrayToReturn));
 }