Ejemplo n.º 1
0
 public static function GetObjectFromSoapObject($objSoapObject)
 {
     $objToReturn = new Phone();
     if (property_exists($objSoapObject, 'Id')) {
         $objToReturn->intId = $objSoapObject->Id;
     }
     if (property_exists($objSoapObject, 'PhoneTypeId')) {
         $objToReturn->intPhoneTypeId = $objSoapObject->PhoneTypeId;
     }
     if (property_exists($objSoapObject, 'Address') && $objSoapObject->Address) {
         $objToReturn->Address = Address::GetObjectFromSoapObject($objSoapObject->Address);
     }
     if (property_exists($objSoapObject, 'Person') && $objSoapObject->Person) {
         $objToReturn->Person = Person::GetObjectFromSoapObject($objSoapObject->Person);
     }
     if (property_exists($objSoapObject, 'MobileProvider') && $objSoapObject->MobileProvider) {
         $objToReturn->MobileProvider = MobileProvider::GetObjectFromSoapObject($objSoapObject->MobileProvider);
     }
     if (property_exists($objSoapObject, 'Number')) {
         $objToReturn->strNumber = $objSoapObject->Number;
     }
     if (property_exists($objSoapObject, '__blnRestored')) {
         $objToReturn->__blnRestored = $objSoapObject->__blnRestored;
     }
     return $objToReturn;
 }
Ejemplo n.º 2
0
 public static function GetArrayFromSoapArray($objSoapArray)
 {
     $objArrayToReturn = array();
     foreach ($objSoapArray as $objSoapObject) {
         array_push($objArrayToReturn, MobileProvider::GetObjectFromSoapObject($objSoapObject));
     }
     return $objArrayToReturn;
 }