예제 #1
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Sagem', 'SAGEM'));
 }
예제 #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'));
 }
예제 #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'));
 }
예제 #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'));
 }
예제 #6
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android');
 }
예제 #7
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithCaseInsensitive($userAgent, "alcatel");
 }
예제 #8
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Qtek');
 }
예제 #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');
 }
예제 #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'));
 }
예제 #11
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('HTC', 'XV6875'));
 }
예제 #12
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('kyocera', 'QC-', 'KWC-'));
 }
예제 #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');
 }
예제 #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");
 }
예제 #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');
 }
예제 #16
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Windows Phone', 'NativeHost'));
 }
예제 #17
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsCaseInsensitive($userAgent, "BlackBerry");
 }
예제 #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");
 }
예제 #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');
 }
예제 #20
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array("LGUPLUS", "lgtelecom"));
 }
예제 #21
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Grundig', 'GRUNDIG'));
 }
예제 #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-'));
 }
예제 #23
0
 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Android', 'Opera Mini'));
 }
예제 #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');
 }
예제 #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'));
 }
예제 #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'));
 }
예제 #27
0
파일: Handler.php 프로젝트: vazahat/dudex
 /**
  * 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;
 }
예제 #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;
 }