| @@ 123-137 (lines=15) @@ | ||
| 120 | * |
|
| 121 | * @return bool |
|
| 122 | */ |
|
| 123 | public static function checkBrowserBlackBerry() |
|
| 124 | { |
|
| 125 | if (stripos(self::$userAgentString, 'blackberry') !== false) { |
|
| 126 | $aresult = explode('/', stristr(self::$userAgentString, 'BlackBerry')); |
|
| 127 | if (isset($aresult[1])) { |
|
| 128 | $aversion = explode(' ', $aresult[1]); |
|
| 129 | self::$browser->setVersion($aversion[0]); |
|
| 130 | } |
|
| 131 | self::$browser->setName(Browser::BLACKBERRY); |
|
| 132 | ||
| 133 | return true; |
|
| 134 | } |
|
| 135 | ||
| 136 | return false; |
|
| 137 | } |
|
| 138 | ||
| 139 | /** |
|
| 140 | * Determine if the browser is a robot. |
|
| @@ 382-396 (lines=15) @@ | ||
| 379 | * |
|
| 380 | * @return bool |
|
| 381 | */ |
|
| 382 | public static function checkBrowserVivaldi() |
|
| 383 | { |
|
| 384 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 385 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 386 | if (isset($aresult[1])) { |
|
| 387 | $aversion = explode(' ', $aresult[1]); |
|
| 388 | self::$browser->setVersion($aversion[0]); |
|
| 389 | } |
|
| 390 | self::$browser->setName(Browser::VIVALDI); |
|
| 391 | ||
| 392 | return true; |
|
| 393 | } |
|
| 394 | ||
| 395 | return false; |
|
| 396 | } |
|
| 397 | ||
| 398 | /** |
|
| 399 | * Determine if the browser is Microsoft Edge. |
|
| @@ 423-437 (lines=15) @@ | ||
| 420 | * |
|
| 421 | * @return bool |
|
| 422 | */ |
|
| 423 | public static function checkBrowserGsa() |
|
| 424 | { |
|
| 425 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 426 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 427 | if (isset($aresult[1])) { |
|
| 428 | $aversion = explode(' ', $aresult[1]); |
|
| 429 | self::$browser->setVersion($aversion[0]); |
|
| 430 | } |
|
| 431 | self::$browser->setName(Browser::GSA); |
|
| 432 | ||
| 433 | return true; |
|
| 434 | } |
|
| 435 | ||
| 436 | return false; |
|
| 437 | } |
|
| 438 | ||
| 439 | /** |
|
| 440 | * Determine if the browser is WebTv. |
|
| @@ 444-458 (lines=15) @@ | ||
| 441 | * |
|
| 442 | * @return bool |
|
| 443 | */ |
|
| 444 | public static function checkBrowserWebTv() |
|
| 445 | { |
|
| 446 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 447 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 448 | if (isset($aresult[1])) { |
|
| 449 | $aversion = explode(' ', $aresult[1]); |
|
| 450 | self::$browser->setVersion($aversion[0]); |
|
| 451 | } |
|
| 452 | self::$browser->setName(Browser::WEBTV); |
|
| 453 | ||
| 454 | return true; |
|
| 455 | } |
|
| 456 | ||
| 457 | return false; |
|
| 458 | } |
|
| 459 | ||
| 460 | /** |
|
| 461 | * Determine if the browser is NetPositive. |
|
| @@ 486-500 (lines=15) @@ | ||
| 483 | * |
|
| 484 | * @return bool |
|
| 485 | */ |
|
| 486 | public static function checkBrowserGaleon() |
|
| 487 | { |
|
| 488 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 489 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 490 | $aversion = explode('/', $aresult[0]); |
|
| 491 | if (isset($aversion[1])) { |
|
| 492 | self::$browser->setVersion($aversion[1]); |
|
| 493 | } |
|
| 494 | self::$browser->setName(Browser::GALEON); |
|
| 495 | ||
| 496 | return true; |
|
| 497 | } |
|
| 498 | ||
| 499 | return false; |
|
| 500 | } |
|
| 501 | ||
| 502 | /** |
|
| 503 | * Determine if the browser is Konqueror. |
|
| @@ 507-521 (lines=15) @@ | ||
| 504 | * |
|
| 505 | * @return bool |
|
| 506 | */ |
|
| 507 | public static function checkBrowserKonqueror() |
|
| 508 | { |
|
| 509 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 510 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 511 | $aversion = explode('/', $aresult[0]); |
|
| 512 | if (isset($aversion[1])) { |
|
| 513 | self::$browser->setVersion($aversion[1]); |
|
| 514 | } |
|
| 515 | self::$browser->setName(Browser::KONQUEROR); |
|
| 516 | ||
| 517 | return true; |
|
| 518 | } |
|
| 519 | ||
| 520 | return false; |
|
| 521 | } |
|
| 522 | ||
| 523 | /** |
|
| 524 | * Determine if the browser is iCab. |
|
| @@ 528-541 (lines=14) @@ | ||
| 525 | * |
|
| 526 | * @return bool |
|
| 527 | */ |
|
| 528 | public static function checkBrowserIcab() |
|
| 529 | { |
|
| 530 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 531 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 532 | if (isset($aversion[1])) { |
|
| 533 | self::$browser->setVersion($aversion[1]); |
|
| 534 | } |
|
| 535 | self::$browser->setName(Browser::ICAB); |
|
| 536 | ||
| 537 | return true; |
|
| 538 | } |
|
| 539 | ||
| 540 | return false; |
|
| 541 | } |
|
| 542 | ||
| 543 | /** |
|
| 544 | * Determine if the browser is OmniWeb. |
|
| @@ 548-560 (lines=13) @@ | ||
| 545 | * |
|
| 546 | * @return bool |
|
| 547 | */ |
|
| 548 | public static function checkBrowserOmniWeb() |
|
| 549 | { |
|
| 550 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 551 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 552 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 553 | self::$browser->setVersion($aversion[0]); |
|
| 554 | self::$browser->setName(Browser::OMNIWEB); |
|
| 555 | ||
| 556 | return true; |
|
| 557 | } |
|
| 558 | ||
| 559 | return false; |
|
| 560 | } |
|
| 561 | ||
| 562 | /** |
|
| 563 | * Determine if the browser is Phoenix. |
|
| @@ 754-768 (lines=15) @@ | ||
| 751 | * |
|
| 752 | * @return bool |
|
| 753 | */ |
|
| 754 | public static function checkBrowserIceweasel() |
|
| 755 | { |
|
| 756 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 757 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 758 | if (isset($aresult[1])) { |
|
| 759 | $aversion = explode(' ', $aresult[1]); |
|
| 760 | self::$browser->setVersion($aversion[0]); |
|
| 761 | } |
|
| 762 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 763 | ||
| 764 | return true; |
|
| 765 | } |
|
| 766 | ||
| 767 | return false; |
|
| 768 | } |
|
| 769 | ||
| 770 | /** |
|
| 771 | * Determine if the browser is Mozilla. |
|
| @@ 816-828 (lines=13) @@ | ||
| 813 | * |
|
| 814 | * @return bool |
|
| 815 | */ |
|
| 816 | public static function checkBrowserLynx() |
|
| 817 | { |
|
| 818 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 819 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 820 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 821 | self::$browser->setVersion($aversion[0]); |
|
| 822 | self::$browser->setName(Browser::LYNX); |
|
| 823 | ||
| 824 | return true; |
|
| 825 | } |
|
| 826 | ||
| 827 | return false; |
|
| 828 | } |
|
| 829 | ||
| 830 | /** |
|
| 831 | * Determine if the browser is Amaya. |
|
| @@ 835-849 (lines=15) @@ | ||
| 832 | * |
|
| 833 | * @return bool |
|
| 834 | */ |
|
| 835 | public static function checkBrowserAmaya() |
|
| 836 | { |
|
| 837 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 838 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 839 | if (isset($aresult[1])) { |
|
| 840 | $aversion = explode(' ', $aresult[1]); |
|
| 841 | self::$browser->setVersion($aversion[0]); |
|
| 842 | } |
|
| 843 | self::$browser->setName(Browser::AMAYA); |
|
| 844 | ||
| 845 | return true; |
|
| 846 | } |
|
| 847 | ||
| 848 | return false; |
|
| 849 | } |
|
| 850 | ||
| 851 | /** |
|
| 852 | * Determine if the browser is Safari. |
|
| @@ 879-893 (lines=15) @@ | ||
| 876 | * |
|
| 877 | * @return bool |
|
| 878 | */ |
|
| 879 | public static function checkBrowserYandex() |
|
| 880 | { |
|
| 881 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 882 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 883 | if (isset($aresult[1])) { |
|
| 884 | $aversion = explode(' ', $aresult[1]); |
|
| 885 | self::$browser->setVersion($aversion[0]); |
|
| 886 | } |
|
| 887 | self::$browser->setName(Browser::YANDEX); |
|
| 888 | ||
| 889 | return true; |
|
| 890 | } |
|
| 891 | ||
| 892 | return false; |
|
| 893 | } |
|
| 894 | ||
| 895 | /** |
|
| 896 | * Determine if the browser is Android. |
|