当前位置: 首页>>代码示例>>PHP>>正文


PHP WURFL_Handlers_Utils::checkIfContainsAnyOf方法代码示例

本文整理汇总了PHP中WURFL_Handlers_Utils::checkIfContainsAnyOf方法的典型用法代码示例。如果您正苦于以下问题:PHP WURFL_Handlers_Utils::checkIfContainsAnyOf方法的具体用法?PHP WURFL_Handlers_Utils::checkIfContainsAnyOf怎么用?PHP WURFL_Handlers_Utils::checkIfContainsAnyOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WURFL_Handlers_Utils的用法示例。


在下文中一共展示了WURFL_Handlers_Utils::checkIfContainsAnyOf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: canHandle

 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'));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:AppleHandler.php

示例2: canHandle

 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');
 }
开发者ID:acasademont,项目名称:wurfl,代码行数:7,代码来源:AppleHandler.php

示例3: canHandle

 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'));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:OperaMobiOrTabletOnAndroidHandler.php

示例4: normalize

 public function normalize($userAgent)
 {
     // Normalize Android version
     $userAgent = preg_replace('/(Android)[ \\-\\/](\\d\\.\\d)([^; \\/\\)]+)/', '$1 $2', $userAgent);
     // Opera Mobi/Tablet
     $is_opera_mobi = WURFL_Handlers_Utils::checkIfContains($userAgent, 'Opera Mobi');
     $is_opera_tablet = WURFL_Handlers_Utils::checkIfContains($userAgent, 'Opera Tablet');
     if ($is_opera_mobi || $is_opera_tablet) {
         $opera_version = WURFL_Handlers_AndroidHandler::getOperaOnAndroidVersion($userAgent, false);
         $android_version = WURFL_Handlers_AndroidHandler::getAndroidVersion($userAgent, false);
         if ($opera_version !== null && $android_version !== null) {
             $opera_model = $is_opera_tablet ? 'Opera Tablet' : 'Opera Mobi';
             $prefix = $opera_model . ' ' . $opera_version . ' Android ' . $android_version . WURFL_Constants::RIS_DELIMITER;
             return $prefix . $userAgent;
         }
     }
     // Stock Android
     if (!WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, $this->skip_normalization)) {
         $model = WURFL_Handlers_AndroidHandler::getAndroidModel($userAgent, false);
         $version = WURFL_Handlers_AndroidHandler::getAndroidVersion($userAgent, false);
         if ($model !== null && $version !== null) {
             $prefix = $version . ' ' . $model . WURFL_Constants::RIS_DELIMITER;
             return $prefix . $userAgent;
         }
     }
     return $userAgent;
 }
开发者ID:NinjoCat,项目名称:Ninjo,代码行数:27,代码来源:Android.php

示例5: applyRecoveryMatch

 public function applyRecoveryMatch($userAgent)
 {
     if (WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('SLCC1', 'Media Center PC', '.NET CLR', 'OfficeLiveConnector'))) {
         return WURFL_Constants::GENERIC_WEB_BROWSER;
     }
     return WURFL_Constants::NO_MATCH;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:MSIEHandler.php

示例6: applyRecoveryMatch

 public function applyRecoveryMatch($userAgent)
 {
     if (WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Macintosh', 'Windows'))) {
         return WURFL_Constants::GENERIC_WEB_BROWSER;
     }
     return WURFL_Constants::NO_MATCH;
 }
开发者ID:dcunited08,项目名称:wurfl-api,代码行数:7,代码来源:SafariHandler.php

示例7: canHandle

 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array("LGUPLUS", "lgtelecom"));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:LGUPLUSHandler.php

示例8: canHandle

 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Android', '/Kindle'))) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Kindle', 'Silk'));
 }
开发者ID:dcunited08,项目名称:wurfl-api,代码行数:7,代码来源:KindleHandler.php

示例9: canHandle

 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'));
 }
开发者ID:acasademont,项目名称:wurfl,代码行数:7,代码来源:NokiaHandler.php

示例10: canHandle

 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'));
 }
开发者ID:dcunited08,项目名称:wurfl-api,代码行数:7,代码来源:SamsungHandler.php

示例11: canHandle

 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isMobileBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Thunderbird', 'Microsoft Outlook', 'MSOffice'));
 }
开发者ID:acasademont,项目名称:wurfl,代码行数:7,代码来源:DesktopApplicationHandler.php

示例12: canHandle

 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Windows Phone', 'WindowsPhone', 'NativeHost'));
 }
开发者ID:conversionstudio,项目名称:cpatracker,代码行数:7,代码来源:WindowsPhoneHandler.php

示例13: normalize

 public function normalize($userAgent)
 {
     if (WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('WPDesktop', 'ZuneWP7')) || WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Mozilla/5.0 (Windows NT ', ' ARM;', ' Edge/'))) {
         $model = WURFL_Handlers_WindowsPhoneHandler::getWindowsPhoneDesktopModel($userAgent);
         $version = WURFL_Handlers_WindowsPhoneHandler::getWindowsPhoneDesktopVersion($userAgent);
     } else {
         if (WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Windows Phone Ad Client', 'WindowsPhoneAdClient'))) {
             $model = WURFL_Handlers_WindowsPhoneHandler::getWindowsPhoneAdClientModel($userAgent);
             $version = WURFL_Handlers_WindowsPhoneHandler::getWindowsPhoneVersion($userAgent);
         } else {
             if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'NativeHost')) {
                 return $userAgent;
             } else {
                 $model = WURFL_Handlers_WindowsPhoneHandler::getWindowsPhoneModel($userAgent);
                 $version = WURFL_Handlers_WindowsPhoneHandler::getWindowsPhoneVersion($userAgent);
             }
         }
     }
     if ($model !== null && $version !== null) {
         // "WP" is for Windows Phone
         $prefix = 'WP' . $version . ' ' . $model . WURFL_Constants::RIS_DELIMITER;
         return $prefix . $userAgent;
     }
     return $userAgent;
 }
开发者ID:dcunited08,项目名称:wurfl-api,代码行数:25,代码来源:WindowsPhone.php

示例14: applyRecoveryMatch

 public function applyRecoveryMatch($userAgent)
 {
     if (WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('MIB/2.2', 'MIB/BER2.2'))) {
         return "mot_mib22_generic";
     }
     return null;
 }
开发者ID:godboko,项目名称:modules,代码行数:7,代码来源:MotorolaHandler.php

示例15: canHandle

 public function canHandle($userAgent)
 {
     if (WURFL_Handlers_Utils::isMobileBrowser($userAgent)) {
         return false;
     }
     return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Opera', 'OPR/'));
 }
开发者ID:acasademont,项目名称:wurfl,代码行数:7,代码来源:OperaHandler.php


注:本文中的WURFL_Handlers_Utils::checkIfContainsAnyOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。