Пример #1
0
 public static function GetSoapArrayFromArray($objArray)
 {
     if (!$objArray) {
         return null;
     }
     $objArrayToReturn = array();
     foreach ($objArray as $objObject) {
         array_push($objArrayToReturn, Manufacturer::GetSoapObjectFromObject($objObject, true));
     }
     return unserialize(serialize($objArrayToReturn));
 }
Пример #2
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objCategory) {
         $objObject->objCategory = Category::GetSoapObjectFromObject($objObject->objCategory, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCategoryId = null;
         }
     }
     if ($objObject->objManufacturer) {
         $objObject->objManufacturer = Manufacturer::GetSoapObjectFromObject($objObject->objManufacturer, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intManufacturerId = 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;
         }
     }
     return $objObject;
 }
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objManufacturer) {
         $objObject->objManufacturer = Manufacturer::GetSoapObjectFromObject($objObject->objManufacturer, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intManufacturerId = null;
         }
     }
     return $objObject;
 }