public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objAsset) {
         $objObject->objAsset = Asset::GetSoapObjectFromObject($objObject->objAsset, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intAssetId = null;
         }
     }
     return $objObject;
 }
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objAsset) {
         $objObject->objAsset = Asset::GetSoapObjectFromObject($objObject->objAsset, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intAssetId = null;
         }
     }
     if ($objObject->objTransaction) {
         $objObject->objTransaction = Transaction::GetSoapObjectFromObject($objObject->objTransaction, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intTransactionId = null;
         }
     }
     if ($objObject->objParentAssetTransaction) {
         $objObject->objParentAssetTransaction = AssetTransaction::GetSoapObjectFromObject($objObject->objParentAssetTransaction, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentAssetTransactionId = null;
         }
     }
     if ($objObject->objSourceLocation) {
         $objObject->objSourceLocation = Location::GetSoapObjectFromObject($objObject->objSourceLocation, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intSourceLocationId = null;
         }
     }
     if ($objObject->objDestinationLocation) {
         $objObject->objDestinationLocation = Location::GetSoapObjectFromObject($objObject->objDestinationLocation, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intDestinationLocationId = null;
         }
     }
     if ($objObject->objNewAsset) {
         $objObject->objNewAsset = Asset::GetSoapObjectFromObject($objObject->objNewAsset, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intNewAssetId = null;
         }
     }
     if ($objObject->dttScheduleReceiptDueDate) {
         $objObject->dttScheduleReceiptDueDate = $objObject->dttScheduleReceiptDueDate->__toString(QDateTime::FormatSoap);
     }
     if ($objObject->objCreatedByObject) {
         $objObject->objCreatedByObject = UserAccount::GetSoapObjectFromObject($objObject->objCreatedByObject, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCreatedBy = null;
         }
     }
     if ($objObject->dttCreationDate) {
         $objObject->dttCreationDate = $objObject->dttCreationDate->__toString(QDateTime::FormatSoap);
     }
     if ($objObject->objModifiedByObject) {
         $objObject->objModifiedByObject = UserAccount::GetSoapObjectFromObject($objObject->objModifiedByObject, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intModifiedBy = null;
         }
     }
     return $objObject;
 }
예제 #3
0
 public static function GetSoapArrayFromArray($objArray)
 {
     if (!$objArray) {
         return null;
     }
     $objArrayToReturn = array();
     foreach ($objArray as $objObject) {
         array_push($objArrayToReturn, Asset::GetSoapObjectFromObject($objObject, true));
     }
     return unserialize(serialize($objArrayToReturn));
 }
예제 #4
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objParentAsset) {
         $objObject->objParentAsset = Asset::GetSoapObjectFromObject($objObject->objParentAsset, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentAssetId = null;
         }
     }
     if ($objObject->objAssetModel) {
         $objObject->objAssetModel = AssetModel::GetSoapObjectFromObject($objObject->objAssetModel, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intAssetModelId = null;
         }
     }
     if ($objObject->objLocation) {
         $objObject->objLocation = Location::GetSoapObjectFromObject($objObject->objLocation, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intLocationId = null;
         }
     }
     if ($objObject->objCreatedByObject) {
         $objObject->objCreatedByObject = UserAccount::GetSoapObjectFromObject($objObject->objCreatedByObject, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCreatedBy = null;
         }
     }
     if ($objObject->dttCreationDate) {
         $objObject->dttCreationDate = $objObject->dttCreationDate->__toString(QDateTime::FormatSoap);
     }
     if ($objObject->objModifiedByObject) {
         $objObject->objModifiedByObject = UserAccount::GetSoapObjectFromObject($objObject->objModifiedByObject, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intModifiedBy = null;
         }
     }
     if ($objObject->dttPurchaseDate) {
         $objObject->dttPurchaseDate = $objObject->dttPurchaseDate->__toString(QDateTime::FormatSoap);
     }
     return $objObject;
 }