Exemplo n.º 1
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Sagem', 'SAGEM'));
 }
Exemplo n.º 2
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Nokia') && !WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Android', 'iPhone'));
 }
Exemplo n.º 3
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla/5') && WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('iPhone', 'iPod', 'iPad'));
 }
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android') && WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Opera Mobi', 'Opera Tablet'));
 }
Exemplo n.º 5
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Samsung', 'SAMSUNG')) || WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('SEC-', 'SPH', 'SGH', 'SCH'));
 }
Exemplo n.º 6
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android');
 }
Exemplo n.º 7
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithCaseInsensitive($userAgent, "alcatel");
 }
Exemplo n.º 8
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Qtek');
 }
Exemplo n.º 9
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsCaseInsensitive($userAgent, 'blackberry') || WURFL_Handlers_Utils::checkIfContains($userAgent, '(BB10;') || WURFL_Handlers_Utils::checkIfContains($userAgent, '(PlayBook');
 }
Exemplo n.º 10
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android') && WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Fennec', 'Firefox'));
 }
Exemplo n.º 11
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('HTC', 'XV6875'));
 }
Exemplo n.º 12
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('kyocera', 'QC-', 'KWC-'));
 }
Exemplo n.º 13
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Sanyo', 'SANYO')) || WURFL_Handlers_Utils::checkIfContains($userAgent, 'MobilePhone');
 }
Exemplo n.º 14
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "Alcatel") || WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "ALCATEL");
 }
Exemplo n.º 15
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Mot-', 'MOT-', 'MOTO', 'moto')) || WURFL_Handlers_Utils::checkIfContains($userAgent, 'Motorola');
 }
Exemplo n.º 16
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Windows Phone', 'NativeHost'));
 }
Exemplo n.º 17
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsCaseInsensitive($userAgent, "BlackBerry");
 }
Exemplo n.º 18
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "Philips") || WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "PHILIPS");
 }
Exemplo n.º 19
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla') && WURFL_Handlers_Utils::checkIfContains($userAgent, 'UCBrowser');
 }
Exemplo n.º 20
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array("LGUPLUS", "lgtelecom"));
 }
Exemplo n.º 21
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Grundig', 'GRUNDIG'));
 }
Exemplo n.º 22
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Pantech', 'PT-', 'PANTECH', 'PG-'));
 }
Exemplo n.º 23
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Android', 'Opera Mini'));
 }
Exemplo n.º 24
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('iPhone', 'iPod', 'iPad')) && !WURFL_Handlers_Utils::checkIfContains($userAgent, 'Symbian');
 }
Exemplo n.º 25
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Nintendo')) {
         return true;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla/') && WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Nitro', 'Opera'));
 }
Exemplo n.º 26
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     // Capturing WP desktop mode UAs but not Windows RT UAs
     if (WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('WPDesktop', 'ZuneWP7')) || WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Mozilla/5.0 (Windows NT ', ' ARM;', ' Edge/'))) {
         return true;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Windows Phone', 'WindowsPhone', 'NativeHost'));
 }
Exemplo n.º 27
0
 /**
  * Applies Catch-All match
  * @param string $userAgent
  * @return string WURFL deviceID
  */
 public function applyRecoveryCatchAllMatch($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowserHeavyDutyAnalysis($userAgent)) {
         return WURFL_Constants::GENERIC_WEB_BROWSER;
     }
     $mobile = WURFL_Handlers_Utils::isMobileBrowser($userAgent);
     $desktop = WURFL_Handlers_Utils::isDesktopBrowser($userAgent);
     if (!$desktop) {
         $deviceId = WURFL_Handlers_Utils::getMobileCatchAllId($userAgent);
         if ($deviceId !== WURFL_Constants::NO_MATCH) {
             return $deviceId;
         }
     }
     if ($mobile) {
         return WURFL_Constants::GENERIC_MOBILE;
     }
     if ($desktop) {
         return WURFL_Constants::GENERIC_WEB_BROWSER;
     }
     return WURFL_Constants::GENERIC;
 }
Exemplo n.º 28
0
 /**
  * Is the given user agent very likely to be a desktop browser
  * @param string $userAgent
  * @return bool
  */
 public static function isDesktopBrowserHeavyDutyAnalysis($userAgent)
 {
     // Check Smart TV keywords
     if (WURFL_Handlers_Utils::isSmartTV($userAgent)) {
         return false;
     }
     // Chrome
     if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Chrome') && !WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Android', 'Ventana'))) {
         return true;
     }
     // Check mobile keywords
     if (WURFL_Handlers_Utils::isMobileBrowser($userAgent)) {
         return false;
     }
     if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'PPC')) {
         return false;
     }
     // PowerPC; not always mobile, but we'll kick it out
     // Firefox;  fennec is already handled in the WURFL_Constants::$MOBILE_BROWSERS keywords
     if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Firefox') && !WURFL_Handlers_Utils::checkIfContains($userAgent, 'Tablet')) {
         return true;
     }
     // Safari
     if (preg_match('#^Mozilla/5\\.0 \\((?:Macintosh|Windows)[^\\)]+\\) AppleWebKit/[\\d\\.]+ \\(KHTML, like Gecko\\) Version/[\\d\\.]+ Safari/[\\d\\.]+$#', $userAgent)) {
         return true;
     }
     // Opera Desktop
     if (WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Opera/9.80 (Windows NT', 'Opera/9.80 (Macintosh')) {
         return true;
     }
     // Check desktop keywords
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return true;
     }
     // Internet Explorer 11
     if (preg_match('/^Mozilla\\/5\\.0 \\(Windows NT.+?Trident.+?; rv:\\d\\d\\.\\d+\\)/', $userAgent)) {
         return true;
     }
     // Internet Explorer 9 or 10
     if (preg_match('/^Mozilla\\/5\\.0 \\(compatible; MSIE (9|10)\\.0; Windows NT \\d\\.\\d/', $userAgent)) {
         return true;
     }
     // Internet Explorer <9
     if (preg_match('/^Mozilla\\/4\\.0 \\(compatible; MSIE \\d\\.\\d; Windows NT \\d\\.\\d/', $userAgent)) {
         return true;
     }
     return false;
 }