/**
  * Set the gadget type to one of the GADGET_TYPE_* constants: desktop, phone, etc.
  * @return gadgetType
  */
 protected function setGadgetType()
 {
     parent::setGadgetType();
     // Allows for setting this in the URL (as a GET variable)
     if ($this->gadgetType == parent::GADGET_TYPE_UNKNOWN) {
         $this->gadgetType = parent::GADGET_TYPE_DESKTOP;
     }
     if ($this->debugging) {
         print '<ul class="debugging">';
         print '<li>this->gadgetType: ' . $this->gadgetType . '</li>';
         print '</ul>';
     }
     return $this->gadgetType;
 }
 /**
  * Set the gadget type to one of the GADGET_TYPE_* constants: desktop, phone, etc.
  * @return gadgetType
  */
 protected function setGadgetType()
 {
     parent::setGadgetType();
     if ($this->gadgetType == parent::GADGET_TYPE_UNKNOWN) {
         if ($this->mobileDetectObject->isTablet()) {
             $this->gadgetType = parent::GADGET_TYPE_TABLET;
         } else {
             if ($this->mobileDetectObject->isMobile()) {
                 $this->gadgetType = parent::GADGET_TYPE_PHONE;
             } else {
                 $this->gadgetType = parent::GADGET_TYPE_DESKTOP;
             }
         }
     }
     return $this->gadgetType;
 }
 /**
  * Set the gadget type to one of the GADGET_TYPE_* constants: desktop, phone, etc.
  * @return gadgetType
  */
 protected function setGadgetType()
 {
     global $usingMobilePhone;
     parent::setGadgetType();
     if ($this->debugging) {
         print '<ul class="debugging">';
         print '<li>usingMobilePhone (global): ' . $usingMobilePhone . '</li>';
         print '<li>this->usingMobilePhone: ' . $this->usingMobilePhone . '</li>';
         print '<li>this->gadgetType: ' . $this->gadgetType . '</li>';
         print '</ul>';
     }
     if ($this->gadgetType == parent::GADGET_TYPE_UNKNOWN) {
         if ($this->usingMobilePhone === null) {
             $this->usingMobilePhone = $usingMobilePhone;
             // use global value
         }
         if (isset($this->usingMobilePhone) && $this->usingMobilePhone) {
             $this->gadgetType = parent::GADGET_TYPE_PHONE;
         } else {
             $this->gadgetType = parent::GADGET_TYPE_DESKTOP;
         }
     }
     return $this->gadgetType;
 }
 /**
  * Set the gadget type to one of the GADGET_TYPE_* constants: desktop, phone, etc.
  * @return gadgetType
  */
 protected function setGadgetType($pointing_method, $is_tablet)
 {
     parent::setGadgetType();
     if ($this->gadgetType === parent::GADGET_TYPE_UNKNOWN) {
         if (isset($pointing_method)) {
             if ($pointing_method == "mouse") {
                 $this->gadgetType = parent::GADGET_TYPE_DESKTOP;
             } else {
                 if ($pointing_method == "touchscreen") {
                     if (isset($is_tablet) && $is_tablet == "true") {
                         $this->gadgetType = parent::GADGET_TYPE_TABLET;
                     } else {
                         $this->gadgetType = parent::GADGET_TYPE_PHONE;
                     }
                 }
             }
         }
     }
     return $this->gadgetType;
 }