예제 #1
0
 public function setData($data)
 {
     /*
      * This conditional handles the differences between a Device object
      * that is returned in a QuerySub Subscriber object vs. a Device object
      * from QueryDevice.
      */
     if (empty($data->DeviceBasics)) {
         $this->id = $data->DeviceId;
         $this->type = $data->DeviceType;
         $this->model = $data->DeviceModel;
         $this->status = $data->DeviceStatus;
         $this->unitAddress = $data->UnitAddress;
         $this->hostId = $data->HostId;
         $this->securityData = $data->SecurityData;
         if (!empty($data->CustomFieldList->CustomField)) {
             $this->customFieldList = $this->loadCustomFields($data->CustomFieldList->CustomField);
         }
     } else {
         $this->id = $data->DeviceId;
         $this->type = $data->DeviceBasics->DeviceType;
         $this->model = $data->DeviceBasics->DeviceModel;
         $this->status = $data->DeviceBasics->DeviceStatus;
         $this->unitAddress = $data->DeviceBasics->UnitAddress;
         $this->hostId = $data->DeviceBasics->HostId;
         $this->securityData = $data->DeviceBasics->SecurityData;
         if (!empty($data->DeviceBasics->CustomFieldList->CustomField)) {
             $this->customFieldList = $this->loadCustomFields($data->DeviceBasics->CustomFieldList->CustomField);
         }
     }
     if (!empty($data->Location)) {
         $location = new LocationData();
         $location->setData($data->Location);
         $this->location = $location;
     }
     if (!empty($data->Subscriber)) {
         $subscriber = new SubscriberData();
         $subscriber->setData($data->Subscriber);
         $this->subscriber = $subscriber;
     }
     $this->assignOperations();
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
 public function setLongtitude($longtitudeVal)
 {
     LocationData::$userLongtitude = $longtitudeVal;
 }