/** * Set the gadget brand * @return gadgetBrand */ protected function setGadgetBrand() { parent::setGadgetBrand(); if ($this->gadgetBrand == parent::GADGET_BRAND_UNKNOWN) { if ($this->mobileDetectObject->isiPhone() || $this->mobileDetectObject->isiPad()) { $this->gadgetBrand = parent::GADGET_BRAND_APPLE; } else { if ($this->mobileDetectObject->isAsus()) { $this->gadgetBrand = parent::GADGET_BRAND_ASUS; } else { if ($this->mobileDetectObject->isBlackBerry()) { $this->gadgetBrand = parent::GADGET_BRAND_BLACKBERRY; } else { if ($this->mobileDetectObject->isDell()) { $this->gadgetBrand = parent::GADGET_BRAND_DELL; } else { if ($this->mobileDetectObject->isGenericPhone() || $this->mobileDetectObject->isGenericTablet()) { $this->gadgetBrand = parent::GADGET_BRAND_GENERIC; } else { if ($this->mobileDetectObject->isHTC()) { $this->gadgetBrand = parent::GADGET_BRAND_HTC; } else { if ($this->mobileDetectObject->isLG()) { $this->gadgetBrand = parent::GADGET_BRAND_LG; } else { if ($this->mobileDetectObject->isNexus() || $this->mobileDetectObject->isNexusTablet()) { $this->gadgetBrand = parent::GADGET_BRAND_NEXUS; } else { if ($this->mobileDetectObject->isMotorola()) { $this->gadgetBrand = parent::GADGET_BRAND_MOTOROLA; } else { if ($this->mobileDetectObject->isSamsung()) { $this->gadgetBrand = parent::GADGET_BRAND_SAMSUNG; } else { if ($this->mobileDetectObject->isSony()) { $this->gadgetBrand = parent::GADGET_BRAND_SONY; } else { if ($this->mobileDetectObject->isWindowsMobileOS() || $this->mobileDetectObject->isWindowsPhoneOS()) { $this->gadgetBrand = parent::GADGET_BRAND_WINDOWS; } else { if ($this->mobileDetectObject->isAndroidOS()) { $this->gadgetBrand = parent::GADGET_BRAND_ANDROID; } else { $this->gadgetBrand = parent::GADGET_BRAND_UNRECOGNIZED; } } } } } } } } } } } } } } return $this->gadgetBrand; }
/** * Set the gadget brand based on the gadget type and brand name * Note that it does not necessarily equal one of the constants defined in deviceData.php * @return gadgetBrand */ protected function setGadgetBrand($brand_name) { parent::setGadgetBrand(); if ($this->gadgetBrand === parent::GADGET_BRAND_UNKNOWN) { $this->gadgetBrand = parent::GADGET_BRAND_UNRECOGNIZED; if (isset($brand_name)) { if ($this->gadgetType == parent::GADGET_TYPE_DESKTOP) { $this->gadgetBrand = $brand_name; } else { if ($this->gadgetType == parent::GADGET_TYPE_TABLET) { if ($brand_name == parent::GADGET_BRAND_APPLE) { $this->gadgetBrand = parent::GADGET_BRAND_APPLE; } else { $this->gadgetBrand = $brand_name; } } else { if ($this->gadgetType == parent::GADGET_TYPE_PHONE) { if ($brand_name == parent::GADGET_BRAND_APPLE) { $this->gadgetBrand = parent::GADGET_BRAND_APPLE; } else { $this->gadgetBrand = $brand_name; } } else { $this->gadgetBrand = "Unknown Gadget Type " . "(" . $this->gadgetType . "); brand_name: " . $brand_name; } } } } else { $this->gadgetBrand = parent::GADGET_BRAND_UNKNOWN; } } return $this->gadgetBrand; }
/** * Set the gadget brand (in this case it is unknown) * @return gadgetBrand */ protected function setGadgetBrand() { parent::setGadgetBrand(); return $this->gadgetBrand; }