Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/accelera.../includes/vendor
File: Mobile_Detect.php
'MeeGoOS' => 'MeeGo',
[500] Fix | Delete
// http://en.wikipedia.org/wiki/Maemo
[501] Fix | Delete
// @todo: research Maemo in UAs
[502] Fix | Delete
'MaemoOS' => 'Maemo',
[503] Fix | Delete
'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135
[504] Fix | Delete
'webOS' => 'webOS|hpwOS',
[505] Fix | Delete
'badaOS' => '\bBada\b',
[506] Fix | Delete
'BREWOS' => 'BREW',
[507] Fix | Delete
);
[508] Fix | Delete
[509] Fix | Delete
/**
[510] Fix | Delete
* List of mobile User Agents.
[511] Fix | Delete
*
[512] Fix | Delete
* IMPORTANT: This is a list of only mobile browsers.
[513] Fix | Delete
* Mobile Detect 2.x supports only mobile browsers,
[514] Fix | Delete
* it was never designed to detect all browsers.
[515] Fix | Delete
* The change will come in 2017 in the 3.x release for PHP7.
[516] Fix | Delete
*
[517] Fix | Delete
* @var array
[518] Fix | Delete
*/
[519] Fix | Delete
protected static $browsers = array(
[520] Fix | Delete
//'Vivaldi' => 'Vivaldi',
[521] Fix | Delete
// @reference: https://developers.google.com/chrome/mobile/docs/user-agent
[522] Fix | Delete
'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
[523] Fix | Delete
'Dolfin' => '\bDolfin\b',
[524] Fix | Delete
'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+',
[525] Fix | Delete
'Skyfire' => 'Skyfire',
[526] Fix | Delete
'Edge' => 'Mobile Safari/[.0-9]* Edge',
[527] Fix | Delete
'IE' => 'IEMobile|MSIEMobile', // |Trident/[.0-9]+
[528] Fix | Delete
'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS',
[529] Fix | Delete
'Bolt' => 'bolt',
[530] Fix | Delete
'TeaShark' => 'teashark',
[531] Fix | Delete
'Blazer' => 'Blazer',
[532] Fix | Delete
// @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
[533] Fix | Delete
'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
[534] Fix | Delete
// http://en.wikipedia.org/wiki/Midori_(web_browser)
[535] Fix | Delete
//'Midori' => 'midori',
[536] Fix | Delete
//'Tizen' => 'Tizen',
[537] Fix | Delete
'WeChat' => '\bMicroMessenger\b',
[538] Fix | Delete
'UCBrowser' => 'UC.*Browser|UCWEB',
[539] Fix | Delete
'baiduboxapp' => 'baiduboxapp',
[540] Fix | Delete
'baidubrowser' => 'baidubrowser',
[541] Fix | Delete
// https://github.com/serbanghita/Mobile-Detect/issues/7
[542] Fix | Delete
'DiigoBrowser' => 'DiigoBrowser',
[543] Fix | Delete
// http://www.puffinbrowser.com/index.php
[544] Fix | Delete
'Puffin' => 'Puffin',
[545] Fix | Delete
// http://mercury-browser.com/index.html
[546] Fix | Delete
'Mercury' => '\bMercury\b',
[547] Fix | Delete
// http://en.wikipedia.org/wiki/Obigo_Browser
[548] Fix | Delete
'ObigoBrowser' => 'Obigo',
[549] Fix | Delete
// http://en.wikipedia.org/wiki/NetFront
[550] Fix | Delete
'NetFront' => 'NF-Browser',
[551] Fix | Delete
// @reference: http://en.wikipedia.org/wiki/Minimo
[552] Fix | Delete
// http://en.wikipedia.org/wiki/Vision_Mobile_Browser
[553] Fix | Delete
'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
[554] Fix | Delete
// @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
[555] Fix | Delete
'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon',
[556] Fix | Delete
);
[557] Fix | Delete
[558] Fix | Delete
/**
[559] Fix | Delete
* Utilities.
[560] Fix | Delete
*
[561] Fix | Delete
* @var array
[562] Fix | Delete
*/
[563] Fix | Delete
protected static $utilities = array(
[564] Fix | Delete
// Experimental. When a mobile device wants to switch to 'Desktop Mode'.
[565] Fix | Delete
// http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
[566] Fix | Delete
// https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
[567] Fix | Delete
// https://developers.facebook.com/docs/sharing/best-practices
[568] Fix | Delete
'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',
[569] Fix | Delete
'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
[570] Fix | Delete
'DesktopMode' => 'WPDesktop',
[571] Fix | Delete
'TV' => 'SonyDTV|HbbTV', // experimental
[572] Fix | Delete
'WebKit' => '(webkit)[ /]([\w.]+)',
[573] Fix | Delete
// @todo: Include JXD consoles.
[574] Fix | Delete
'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\b',
[575] Fix | Delete
'Watch' => 'SM-V700',
[576] Fix | Delete
);
[577] Fix | Delete
[578] Fix | Delete
/**
[579] Fix | Delete
* All possible HTTP headers that represent the
[580] Fix | Delete
* User-Agent string.
[581] Fix | Delete
*
[582] Fix | Delete
* @var array
[583] Fix | Delete
*/
[584] Fix | Delete
protected static $uaHttpHeaders = array(
[585] Fix | Delete
// The default User-Agent string.
[586] Fix | Delete
'HTTP_USER_AGENT',
[587] Fix | Delete
// Header can occur on devices using Opera Mini.
[588] Fix | Delete
'HTTP_X_OPERAMINI_PHONE_UA',
[589] Fix | Delete
// Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
[590] Fix | Delete
'HTTP_X_DEVICE_USER_AGENT',
[591] Fix | Delete
'HTTP_X_ORIGINAL_USER_AGENT',
[592] Fix | Delete
'HTTP_X_SKYFIRE_PHONE',
[593] Fix | Delete
'HTTP_X_BOLT_PHONE_UA',
[594] Fix | Delete
'HTTP_DEVICE_STOCK_UA',
[595] Fix | Delete
'HTTP_X_UCBROWSER_DEVICE_UA'
[596] Fix | Delete
);
[597] Fix | Delete
[598] Fix | Delete
/**
[599] Fix | Delete
* The individual segments that could exist in a User-Agent string. VER refers to the regular
[600] Fix | Delete
* expression defined in the constant self::VER.
[601] Fix | Delete
*
[602] Fix | Delete
* @var array
[603] Fix | Delete
*/
[604] Fix | Delete
protected static $properties = array(
[605] Fix | Delete
[606] Fix | Delete
// Build
[607] Fix | Delete
'Mobile' => 'Mobile/[VER]',
[608] Fix | Delete
'Build' => 'Build/[VER]',
[609] Fix | Delete
'Version' => 'Version/[VER]',
[610] Fix | Delete
'VendorID' => 'VendorID/[VER]',
[611] Fix | Delete
[612] Fix | Delete
// Devices
[613] Fix | Delete
'iPad' => 'iPad.*CPU[a-z ]+[VER]',
[614] Fix | Delete
'iPhone' => 'iPhone.*CPU[a-z ]+[VER]',
[615] Fix | Delete
'iPod' => 'iPod.*CPU[a-z ]+[VER]',
[616] Fix | Delete
//'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'),
[617] Fix | Delete
'Kindle' => 'Kindle/[VER]',
[618] Fix | Delete
[619] Fix | Delete
// Browser
[620] Fix | Delete
'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'),
[621] Fix | Delete
'Coast' => array('Coast/[VER]'),
[622] Fix | Delete
'Dolfin' => 'Dolfin/[VER]',
[623] Fix | Delete
// @reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
[624] Fix | Delete
'Firefox' => array('Firefox/[VER]', 'FxiOS/[VER]'),
[625] Fix | Delete
'Fennec' => 'Fennec/[VER]',
[626] Fix | Delete
// http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
[627] Fix | Delete
// https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx
[628] Fix | Delete
'Edge' => 'Edge/[VER]',
[629] Fix | Delete
'IE' => array('IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]'),
[630] Fix | Delete
// http://en.wikipedia.org/wiki/NetFront
[631] Fix | Delete
'NetFront' => 'NetFront/[VER]',
[632] Fix | Delete
'NokiaBrowser' => 'NokiaBrowser/[VER]',
[633] Fix | Delete
'Opera' => array( ' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]' ),
[634] Fix | Delete
'Opera Mini' => 'Opera Mini/[VER]',
[635] Fix | Delete
'Opera Mobi' => 'Version/[VER]',
[636] Fix | Delete
'UCBrowser' => array( 'UCWEB[VER]', 'UC.*Browser/[VER]' ),
[637] Fix | Delete
'MQQBrowser' => 'MQQBrowser/[VER]',
[638] Fix | Delete
'MicroMessenger' => 'MicroMessenger/[VER]',
[639] Fix | Delete
'baiduboxapp' => 'baiduboxapp/[VER]',
[640] Fix | Delete
'baidubrowser' => 'baidubrowser/[VER]',
[641] Fix | Delete
'SamsungBrowser' => 'SamsungBrowser/[VER]',
[642] Fix | Delete
'Iron' => 'Iron/[VER]',
[643] Fix | Delete
// @note: Safari 7534.48.3 is actually Version 5.1.
[644] Fix | Delete
// @note: On BlackBerry the Version is overwriten by the OS.
[645] Fix | Delete
'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ),
[646] Fix | Delete
'Skyfire' => 'Skyfire/[VER]',
[647] Fix | Delete
'Tizen' => 'Tizen/[VER]',
[648] Fix | Delete
'Webkit' => 'webkit[ /][VER]',
[649] Fix | Delete
'PaleMoon' => 'PaleMoon/[VER]',
[650] Fix | Delete
[651] Fix | Delete
// Engine
[652] Fix | Delete
'Gecko' => 'Gecko/[VER]',
[653] Fix | Delete
'Trident' => 'Trident/[VER]',
[654] Fix | Delete
'Presto' => 'Presto/[VER]',
[655] Fix | Delete
'Goanna' => 'Goanna/[VER]',
[656] Fix | Delete
[657] Fix | Delete
// OS
[658] Fix | Delete
'iOS' => ' \bi?OS\b [VER][ ;]{1}',
[659] Fix | Delete
'Android' => 'Android [VER]',
[660] Fix | Delete
'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]'),
[661] Fix | Delete
'BREW' => 'BREW [VER]',
[662] Fix | Delete
'Java' => 'Java/[VER]',
[663] Fix | Delete
// @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx
[664] Fix | Delete
// @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases
[665] Fix | Delete
'Windows Phone OS' => array( 'Windows Phone OS [VER]', 'Windows Phone [VER]'),
[666] Fix | Delete
'Windows Phone' => 'Windows Phone [VER]',
[667] Fix | Delete
'Windows CE' => 'Windows CE/[VER]',
[668] Fix | Delete
// http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd
[669] Fix | Delete
'Windows NT' => 'Windows NT [VER]',
[670] Fix | Delete
'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'),
[671] Fix | Delete
'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'),
[672] Fix | Delete
);
[673] Fix | Delete
[674] Fix | Delete
/**
[675] Fix | Delete
* Construct an instance of this class.
[676] Fix | Delete
*
[677] Fix | Delete
* @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored.
[678] Fix | Delete
* If left empty, will use the global _SERVER['HTTP_*'] vars instead.
[679] Fix | Delete
* @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
[680] Fix | Delete
* from the $headers array instead.
[681] Fix | Delete
*/
[682] Fix | Delete
public function __construct(
[683] Fix | Delete
array $headers = null,
[684] Fix | Delete
$userAgent = null
[685] Fix | Delete
) {
[686] Fix | Delete
$this->setHttpHeaders($headers);
[687] Fix | Delete
$this->setUserAgent($userAgent);
[688] Fix | Delete
}
[689] Fix | Delete
[690] Fix | Delete
/**
[691] Fix | Delete
* Get the current script version.
[692] Fix | Delete
* This is useful for the demo.php file,
[693] Fix | Delete
* so people can check on what version they are testing
[694] Fix | Delete
* for mobile devices.
[695] Fix | Delete
*
[696] Fix | Delete
* @return string The version number in semantic version format.
[697] Fix | Delete
*/
[698] Fix | Delete
public static function getScriptVersion()
[699] Fix | Delete
{
[700] Fix | Delete
return self::VERSION;
[701] Fix | Delete
}
[702] Fix | Delete
[703] Fix | Delete
/**
[704] Fix | Delete
* Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
[705] Fix | Delete
*
[706] Fix | Delete
* @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract
[707] Fix | Delete
* the headers. The default null is left for backwards compatibility.
[708] Fix | Delete
*/
[709] Fix | Delete
public function setHttpHeaders($httpHeaders = null)
[710] Fix | Delete
{
[711] Fix | Delete
// use global _SERVER if $httpHeaders aren't defined
[712] Fix | Delete
if (!is_array($httpHeaders) || !count($httpHeaders)) {
[713] Fix | Delete
$httpHeaders = $_SERVER;
[714] Fix | Delete
}
[715] Fix | Delete
[716] Fix | Delete
// clear existing headers
[717] Fix | Delete
$this->httpHeaders = array();
[718] Fix | Delete
[719] Fix | Delete
// Only save HTTP headers. In PHP land, that means only _SERVER vars that
[720] Fix | Delete
// start with HTTP_.
[721] Fix | Delete
foreach ($httpHeaders as $key => $value) {
[722] Fix | Delete
if (substr($key, 0, 5) === 'HTTP_') {
[723] Fix | Delete
$this->httpHeaders[$key] = $value;
[724] Fix | Delete
}
[725] Fix | Delete
}
[726] Fix | Delete
[727] Fix | Delete
// In case we're dealing with CloudFront, we need to know.
[728] Fix | Delete
$this->setCfHeaders($httpHeaders);
[729] Fix | Delete
}
[730] Fix | Delete
[731] Fix | Delete
/**
[732] Fix | Delete
* Retrieves the HTTP headers.
[733] Fix | Delete
*
[734] Fix | Delete
* @return array
[735] Fix | Delete
*/
[736] Fix | Delete
public function getHttpHeaders()
[737] Fix | Delete
{
[738] Fix | Delete
return $this->httpHeaders;
[739] Fix | Delete
}
[740] Fix | Delete
[741] Fix | Delete
/**
[742] Fix | Delete
* Retrieves a particular header. If it doesn't exist, no exception/error is caused.
[743] Fix | Delete
* Simply null is returned.
[744] Fix | Delete
*
[745] Fix | Delete
* @param string $header The name of the header to retrieve. Can be HTTP compliant such as
[746] Fix | Delete
* "User-Agent" or "X-Device-User-Agent" or can be php-esque with the
[747] Fix | Delete
* all-caps, HTTP_ prefixed, underscore seperated awesomeness.
[748] Fix | Delete
*
[749] Fix | Delete
* @return string|null The value of the header.
[750] Fix | Delete
*/
[751] Fix | Delete
public function getHttpHeader($header)
[752] Fix | Delete
{
[753] Fix | Delete
// are we using PHP-flavored headers?
[754] Fix | Delete
if (strpos($header, '_') === false) {
[755] Fix | Delete
$header = str_replace('-', '_', $header);
[756] Fix | Delete
$header = strtoupper($header);
[757] Fix | Delete
}
[758] Fix | Delete
[759] Fix | Delete
// test the alternate, too
[760] Fix | Delete
$altHeader = 'HTTP_' . $header;
[761] Fix | Delete
[762] Fix | Delete
//Test both the regular and the HTTP_ prefix
[763] Fix | Delete
if (isset($this->httpHeaders[$header])) {
[764] Fix | Delete
return $this->httpHeaders[$header];
[765] Fix | Delete
} elseif (isset($this->httpHeaders[$altHeader])) {
[766] Fix | Delete
return $this->httpHeaders[$altHeader];
[767] Fix | Delete
}
[768] Fix | Delete
[769] Fix | Delete
return null;
[770] Fix | Delete
}
[771] Fix | Delete
[772] Fix | Delete
public function getMobileHeaders()
[773] Fix | Delete
{
[774] Fix | Delete
return self::$mobileHeaders;
[775] Fix | Delete
}
[776] Fix | Delete
[777] Fix | Delete
/**
[778] Fix | Delete
* Get all possible HTTP headers that
[779] Fix | Delete
* can contain the User-Agent string.
[780] Fix | Delete
*
[781] Fix | Delete
* @return array List of HTTP headers.
[782] Fix | Delete
*/
[783] Fix | Delete
public function getUaHttpHeaders()
[784] Fix | Delete
{
[785] Fix | Delete
return self::$uaHttpHeaders;
[786] Fix | Delete
}
[787] Fix | Delete
[788] Fix | Delete
[789] Fix | Delete
/**
[790] Fix | Delete
* Set CloudFront headers
[791] Fix | Delete
* http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device
[792] Fix | Delete
*
[793] Fix | Delete
* @param array $cfHeaders List of HTTP headers
[794] Fix | Delete
*
[795] Fix | Delete
* @return boolean If there were CloudFront headers to be set
[796] Fix | Delete
*/
[797] Fix | Delete
public function setCfHeaders($cfHeaders = null) {
[798] Fix | Delete
// use global _SERVER if $cfHeaders aren't defined
[799] Fix | Delete
if (!is_array($cfHeaders) || !count($cfHeaders)) {
[800] Fix | Delete
$cfHeaders = $_SERVER;
[801] Fix | Delete
}
[802] Fix | Delete
[803] Fix | Delete
// clear existing headers
[804] Fix | Delete
$this->cloudfrontHeaders = array();
[805] Fix | Delete
[806] Fix | Delete
// Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that
[807] Fix | Delete
// start with cloudfront-.
[808] Fix | Delete
$response = false;
[809] Fix | Delete
foreach ($cfHeaders as $key => $value) {
[810] Fix | Delete
if (substr(strtolower($key), 0, 16) === 'http_cloudfront_') {
[811] Fix | Delete
$this->cloudfrontHeaders[strtoupper($key)] = $value;
[812] Fix | Delete
$response = true;
[813] Fix | Delete
}
[814] Fix | Delete
}
[815] Fix | Delete
[816] Fix | Delete
return $response;
[817] Fix | Delete
}
[818] Fix | Delete
[819] Fix | Delete
/**
[820] Fix | Delete
* Retrieves the cloudfront headers.
[821] Fix | Delete
*
[822] Fix | Delete
* @return array
[823] Fix | Delete
*/
[824] Fix | Delete
public function getCfHeaders()
[825] Fix | Delete
{
[826] Fix | Delete
return $this->cloudfrontHeaders;
[827] Fix | Delete
}
[828] Fix | Delete
[829] Fix | Delete
/**
[830] Fix | Delete
* @param string $userAgent
[831] Fix | Delete
* @return string
[832] Fix | Delete
*/
[833] Fix | Delete
private function prepareUserAgent($userAgent) {
[834] Fix | Delete
$userAgent = trim($userAgent);
[835] Fix | Delete
$userAgent = substr($userAgent, 0, 500);
[836] Fix | Delete
return $userAgent;
[837] Fix | Delete
}
[838] Fix | Delete
[839] Fix | Delete
/**
[840] Fix | Delete
* Set the User-Agent to be used.
[841] Fix | Delete
*
[842] Fix | Delete
* @param string $userAgent The user agent string to set.
[843] Fix | Delete
*
[844] Fix | Delete
* @return string|null
[845] Fix | Delete
*/
[846] Fix | Delete
public function setUserAgent($userAgent = null)
[847] Fix | Delete
{
[848] Fix | Delete
// Invalidate cache due to #375
[849] Fix | Delete
$this->cache = array();
[850] Fix | Delete
[851] Fix | Delete
if (false === empty($userAgent)) {
[852] Fix | Delete
return $this->userAgent = $this->prepareUserAgent($userAgent);
[853] Fix | Delete
} else {
[854] Fix | Delete
$this->userAgent = null;
[855] Fix | Delete
foreach ($this->getUaHttpHeaders() as $altHeader) {
[856] Fix | Delete
if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
[857] Fix | Delete
$this->userAgent .= $this->httpHeaders[$altHeader] . " ";
[858] Fix | Delete
}
[859] Fix | Delete
}
[860] Fix | Delete
[861] Fix | Delete
if (!empty($this->userAgent)) {
[862] Fix | Delete
return $this->userAgent = $this->prepareUserAgent($this->userAgent);
[863] Fix | Delete
}
[864] Fix | Delete
}
[865] Fix | Delete
[866] Fix | Delete
if (count($this->getCfHeaders()) > 0) {
[867] Fix | Delete
return $this->userAgent = 'Amazon CloudFront';
[868] Fix | Delete
}
[869] Fix | Delete
return $this->userAgent = null;
[870] Fix | Delete
}
[871] Fix | Delete
[872] Fix | Delete
/**
[873] Fix | Delete
* Retrieve the User-Agent.
[874] Fix | Delete
*
[875] Fix | Delete
* @return string|null The user agent if it's set.
[876] Fix | Delete
*/
[877] Fix | Delete
public function getUserAgent()
[878] Fix | Delete
{
[879] Fix | Delete
return $this->userAgent;
[880] Fix | Delete
}
[881] Fix | Delete
[882] Fix | Delete
/**
[883] Fix | Delete
* Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
[884] Fix | Delete
* self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
[885] Fix | Delete
*
[886] Fix | Delete
* @deprecated since version 2.6.9
[887] Fix | Delete
*
[888] Fix | Delete
* @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default
[889] Fix | Delete
* parameter is null which will default to self::DETECTION_TYPE_MOBILE.
[890] Fix | Delete
*/
[891] Fix | Delete
public function setDetectionType($type = null)
[892] Fix | Delete
{
[893] Fix | Delete
if ($type === null) {
[894] Fix | Delete
$type = self::DETECTION_TYPE_MOBILE;
[895] Fix | Delete
}
[896] Fix | Delete
[897] Fix | Delete
if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) {
[898] Fix | Delete
return;
[899] Fix | Delete
}
[900] Fix | Delete
[901] Fix | Delete
$this->detectionType = $type;
[902] Fix | Delete
}
[903] Fix | Delete
[904] Fix | Delete
public function getMatchingRegex()
[905] Fix | Delete
{
[906] Fix | Delete
return $this->matchingRegex;
[907] Fix | Delete
}
[908] Fix | Delete
[909] Fix | Delete
public function getMatchesArray()
[910] Fix | Delete
{
[911] Fix | Delete
return $this->matchesArray;
[912] Fix | Delete
}
[913] Fix | Delete
[914] Fix | Delete
/**
[915] Fix | Delete
* Retrieve the list of known phone devices.
[916] Fix | Delete
*
[917] Fix | Delete
* @return array List of phone devices.
[918] Fix | Delete
*/
[919] Fix | Delete
public static function getPhoneDevices()
[920] Fix | Delete
{
[921] Fix | Delete
return self::$phoneDevices;
[922] Fix | Delete
}
[923] Fix | Delete
[924] Fix | Delete
/**
[925] Fix | Delete
* Retrieve the list of known tablet devices.
[926] Fix | Delete
*
[927] Fix | Delete
* @return array List of tablet devices.
[928] Fix | Delete
*/
[929] Fix | Delete
public static function getTabletDevices()
[930] Fix | Delete
{
[931] Fix | Delete
return self::$tabletDevices;
[932] Fix | Delete
}
[933] Fix | Delete
[934] Fix | Delete
/**
[935] Fix | Delete
* Alias for getBrowsers() method.
[936] Fix | Delete
*
[937] Fix | Delete
* @return array List of user agents.
[938] Fix | Delete
*/
[939] Fix | Delete
public static function getUserAgents()
[940] Fix | Delete
{
[941] Fix | Delete
return self::getBrowsers();
[942] Fix | Delete
}
[943] Fix | Delete
[944] Fix | Delete
/**
[945] Fix | Delete
* Retrieve the list of known browsers. Specifically, the user agents.
[946] Fix | Delete
*
[947] Fix | Delete
* @return array List of browsers / user agents.
[948] Fix | Delete
*/
[949] Fix | Delete
public static function getBrowsers()
[950] Fix | Delete
{
[951] Fix | Delete
return self::$browsers;
[952] Fix | Delete
}
[953] Fix | Delete
[954] Fix | Delete
/**
[955] Fix | Delete
* Retrieve the list of known utilities.
[956] Fix | Delete
*
[957] Fix | Delete
* @return array List of utilities.
[958] Fix | Delete
*/
[959] Fix | Delete
public static function getUtilities()
[960] Fix | Delete
{
[961] Fix | Delete
return self::$utilities;
[962] Fix | Delete
}
[963] Fix | Delete
[964] Fix | Delete
/**
[965] Fix | Delete
* Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
[966] Fix | Delete
*
[967] Fix | Delete
* @deprecated since version 2.6.9
[968] Fix | Delete
*
[969] Fix | Delete
* @return array All the rules (but not extended).
[970] Fix | Delete
*/
[971] Fix | Delete
public static function getMobileDetectionRules()
[972] Fix | Delete
{
[973] Fix | Delete
static $rules;
[974] Fix | Delete
[975] Fix | Delete
if (!$rules) {
[976] Fix | Delete
$rules = array_merge(
[977] Fix | Delete
self::$phoneDevices,
[978] Fix | Delete
self::$tabletDevices,
[979] Fix | Delete
self::$operatingSystems,
[980] Fix | Delete
self::$browsers
[981] Fix | Delete
);
[982] Fix | Delete
}
[983] Fix | Delete
[984] Fix | Delete
return $rules;
[985] Fix | Delete
[986] Fix | Delete
}
[987] Fix | Delete
[988] Fix | Delete
/**
[989] Fix | Delete
* Method gets the mobile detection rules + utilities.
[990] Fix | Delete
* The reason this is separate is because utilities rules
[991] Fix | Delete
* don't necessary imply mobile. This method is used inside
[992] Fix | Delete
* the new $detect->is('stuff') method.
[993] Fix | Delete
*
[994] Fix | Delete
* @deprecated since version 2.6.9
[995] Fix | Delete
*
[996] Fix | Delete
* @return array All the rules + extended.
[997] Fix | Delete
*/
[998] Fix | Delete
public function getMobileDetectionRulesExtended()
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function