Example #1
0
 public function setData($data)
 {
     $this->setPhoneNumber($data->PhoneNumber);
     $this->setServiceEnabled($data->ServiceEnabled);
     $this->setInterfaceGroup($data->InterfaceGroup);
     $this->setCRV($data->CRV);
     $this->setDeviceId($data->DeviceId);
     $this->setSwitchId($data->SwitchId);
     $this->setDSLEquipNumber1($data->DSLEquipNumber);
     $this->setDSLEquipNumber2($data->DSLEquipNumber2);
     $this->setSIPUserName($data->SIPUserName);
     $this->setSIPPassword($data->SIPPassword);
     $this->setCIDLocalName($data->CIDLocalName);
     $this->setPrimaryNumber($data->PrimaryNumber);
     $this->setRingCadence($data->RingCadence);
     $this->setPIC1($data->PIC1);
     $this->setPIC2($data->PIC2);
     $this->setPIC3($data->PIC3);
     $this->setLineType($data->LineType);
     $this->setRADIUSUserName($data->RADIUSUserName);
     $this->setRADIUSUserPswd($data->RADIUSUserPswd);
     $this->setRADIUSFramedIP($data->RADIUSFramedIP);
     if (!empty($data->ServiceList->Service)) {
         $serviceList = array();
         foreach ($data->ServiceList->Service as $s) {
             $service = new ServiceData();
             $service->setData($s);
             $serviceList[] = $service;
         }
         $this->setServiceList($serviceList);
     }
 }
 public function setData($data)
 {
     // var_dump($data);
     $this->setId($data->SubscriberId);
     $sb = $data->SubBasics;
     $this->setName($sb->SubscriberName);
     $this->setPhone($sb->Phone);
     $this->setPINRequired($sb->PINRequired);
     $this->setBillCycle($sb->BillCycle);
     $this->setRatePlan($sb->RatePlan);
     $this->setTaxClass($sb->TaxClass);
     $this->setEmailAddress($sb->EmailAddress);
     $this->setServiceEnabled($sb->ServiceEnabled);
     $this->setPPVPrivileges($sb->PPVPrivileges);
     $this->setPPVCap($sb->PPVCap);
     $this->setPendingWorkorderCount($sb->PendingWOCnt);
     if (!empty($sb->CustomFieldList->CustomField)) {
         $this->setCustomFieldList($this->loadCustomFields($sb->CustomFieldList->CustomField));
     }
     $location = new LocationData();
     if (!empty($data->Location)) {
         $location->setData($data->Location);
     }
     $this->setLocation($location);
     if (!empty($data->ServiceList->Service)) {
         $serviceList = array();
         foreach ($data->ServiceList->Service as $s) {
             $service = new ServiceData();
             $service->setData($s);
             $serviceList[] = $service;
         }
         $this->setServiceList($serviceList);
     }
     if (!empty($data->DeviceList->Device)) {
         $deviceList = array();
         foreach ($data->DeviceList->Device as $d) {
             $device = new DeviceData();
             $device->setData($d);
             $deviceList[] = $device;
         }
         $this->setDeviceList($deviceList);
     }
     if (!empty($data->PhoneList->Phone)) {
         $phoneList = array();
         foreach ($data->PhoneList->Phone as $p) {
             $phone = new PhoneData();
             $phone->setData($p);
             $phoneList[] = $phone;
         }
         $this->setPhoneList($phoneList);
     }
     if (!empty($data->SubBasics->PendingWOList->WorkOrder)) {
         $workOrderList = array();
         foreach ($data->SubBasics->PendingWOList->WorkOrder as $w) {
             $workOrder = new WorkOrderData();
             $workOrder->setData($w);
             $workOrderList[] = $workOrder;
         }
         $this->workOrderList = $workOrderList;
     }
 }