Пример #1
0
 public static function GetObjectFromSoapObject($objSoapObject)
 {
     $objToReturn = new Marriage();
     if (property_exists($objSoapObject, 'Id')) {
         $objToReturn->intId = $objSoapObject->Id;
     }
     if (property_exists($objSoapObject, 'LinkedMarriage') && $objSoapObject->LinkedMarriage) {
         $objToReturn->LinkedMarriage = Marriage::GetObjectFromSoapObject($objSoapObject->LinkedMarriage);
     }
     if (property_exists($objSoapObject, 'Person') && $objSoapObject->Person) {
         $objToReturn->Person = Person::GetObjectFromSoapObject($objSoapObject->Person);
     }
     if (property_exists($objSoapObject, 'MarriedToPerson') && $objSoapObject->MarriedToPerson) {
         $objToReturn->MarriedToPerson = Person::GetObjectFromSoapObject($objSoapObject->MarriedToPerson);
     }
     if (property_exists($objSoapObject, 'MarriageStatusTypeId')) {
         $objToReturn->intMarriageStatusTypeId = $objSoapObject->MarriageStatusTypeId;
     }
     if (property_exists($objSoapObject, 'DateStart')) {
         $objToReturn->dttDateStart = new QDateTime($objSoapObject->DateStart);
     }
     if (property_exists($objSoapObject, 'DateEnd')) {
         $objToReturn->dttDateEnd = new QDateTime($objSoapObject->DateEnd);
     }
     if (property_exists($objSoapObject, '__blnRestored')) {
         $objToReturn->__blnRestored = $objSoapObject->__blnRestored;
     }
     return $objToReturn;
 }