public function isMobile()
{
// Mobile device types
if (!empty($this->device) && in_array($this->device, array(DeviceParserAbstract::DEVICE_TYPE_FEATURE_PHONE, DeviceParserAbstract::DEVICE_TYPE_SMARTPHONE, DeviceParserAbstract::DEVICE_TYPE_TABLET, DeviceParserAbstract::DEVICE_TYPE_PHABLET, DeviceParserAbstract::DEVICE_TYPE_CAMERA, DeviceParserAbstract::DEVICE_TYPE_PORTABLE_MEDIA_PAYER))) {
return true;
}
// non mobile device types
if (!empty($this->device) && in_array($this->device, array(DeviceParserAbstract::DEVICE_TYPE_TV, DeviceParserAbstract::DEVICE_TYPE_SMART_DISPLAY, DeviceParserAbstract::DEVICE_TYPE_CONSOLE))) {
return false;
}
// Check for browsers available for mobile devices only
if ($this->usesMobileBrowser()) {
return true;
}
$osShort = $this->getOs('short_name');
if (empty($osShort) || self::UNKNOWN == $osShort) {
return false;
}
return !$this->isBot() && !$this->isDesktop();
}