| @@ 465-479 (lines=15) @@ | ||
| 462 | * |
|
| 463 | * @return bool |
|
| 464 | */ |
|
| 465 | public static function checkBrowserSamsung() |
|
| 466 | { |
|
| 467 | if (stripos(self::$userAgentString, 'SamsungBrowser') !== false) { |
|
| 468 | $aresult = explode('/', stristr(self::$userAgentString, 'SamsungBrowser')); |
|
| 469 | if (isset($aresult[1])) { |
|
| 470 | $aversion = explode(' ', $aresult[1]); |
|
| 471 | self::$browser->setVersion($aversion[0]); |
|
| 472 | } |
|
| 473 | self::$browser->setName(Browser::SAMSUNG_BROWSER); |
|
| 474 | ||
| 475 | return true; |
|
| 476 | } |
|
| 477 | ||
| 478 | return false; |
|
| 479 | } |
|
| 480 | ||
| 481 | /** |
|
| 482 | * Determine if the browser is Chrome. |
|
| @@ 516-530 (lines=15) @@ | ||
| 513 | * |
|
| 514 | * @return bool |
|
| 515 | */ |
|
| 516 | public static function checkBrowserVivaldi() |
|
| 517 | { |
|
| 518 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 519 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 520 | if (isset($aresult[1])) { |
|
| 521 | $aversion = explode(' ', $aresult[1]); |
|
| 522 | self::$browser->setVersion($aversion[0]); |
|
| 523 | } |
|
| 524 | self::$browser->setName(Browser::VIVALDI); |
|
| 525 | ||
| 526 | return true; |
|
| 527 | } |
|
| 528 | ||
| 529 | return false; |
|
| 530 | } |
|
| 531 | ||
| 532 | /** |
|
| 533 | * Determine if the browser is Microsoft Edge. |
|
| @@ 564-578 (lines=15) @@ | ||
| 561 | * |
|
| 562 | * @return bool |
|
| 563 | */ |
|
| 564 | public static function checkBrowserGsa() |
|
| 565 | { |
|
| 566 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 567 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 568 | if (isset($aresult[1])) { |
|
| 569 | $aversion = explode(' ', $aresult[1]); |
|
| 570 | self::$browser->setVersion($aversion[0]); |
|
| 571 | } |
|
| 572 | self::$browser->setName(Browser::GSA); |
|
| 573 | ||
| 574 | return true; |
|
| 575 | } |
|
| 576 | ||
| 577 | return false; |
|
| 578 | } |
|
| 579 | ||
| 580 | /** |
|
| 581 | * Determine if the browser is WebTv. |
|
| @@ 585-599 (lines=15) @@ | ||
| 582 | * |
|
| 583 | * @return bool |
|
| 584 | */ |
|
| 585 | public static function checkBrowserWebTv() |
|
| 586 | { |
|
| 587 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 588 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 589 | if (isset($aresult[1])) { |
|
| 590 | $aversion = explode(' ', $aresult[1]); |
|
| 591 | self::$browser->setVersion($aversion[0]); |
|
| 592 | } |
|
| 593 | self::$browser->setName(Browser::WEBTV); |
|
| 594 | ||
| 595 | return true; |
|
| 596 | } |
|
| 597 | ||
| 598 | return false; |
|
| 599 | } |
|
| 600 | ||
| 601 | /** |
|
| 602 | * Determine if the browser is NetPositive. |
|
| @@ 627-641 (lines=15) @@ | ||
| 624 | * |
|
| 625 | * @return bool |
|
| 626 | */ |
|
| 627 | public static function checkBrowserGaleon() |
|
| 628 | { |
|
| 629 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 630 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 631 | $aversion = explode('/', $aresult[0]); |
|
| 632 | if (isset($aversion[1])) { |
|
| 633 | self::$browser->setVersion($aversion[1]); |
|
| 634 | } |
|
| 635 | self::$browser->setName(Browser::GALEON); |
|
| 636 | ||
| 637 | return true; |
|
| 638 | } |
|
| 639 | ||
| 640 | return false; |
|
| 641 | } |
|
| 642 | ||
| 643 | /** |
|
| 644 | * Determine if the browser is Konqueror. |
|
| @@ 648-662 (lines=15) @@ | ||
| 645 | * |
|
| 646 | * @return bool |
|
| 647 | */ |
|
| 648 | public static function checkBrowserKonqueror() |
|
| 649 | { |
|
| 650 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 651 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 652 | $aversion = explode('/', $aresult[0]); |
|
| 653 | if (isset($aversion[1])) { |
|
| 654 | self::$browser->setVersion($aversion[1]); |
|
| 655 | } |
|
| 656 | self::$browser->setName(Browser::KONQUEROR); |
|
| 657 | ||
| 658 | return true; |
|
| 659 | } |
|
| 660 | ||
| 661 | return false; |
|
| 662 | } |
|
| 663 | ||
| 664 | /** |
|
| 665 | * Determine if the browser is iCab. |
|
| @@ 669-682 (lines=14) @@ | ||
| 666 | * |
|
| 667 | * @return bool |
|
| 668 | */ |
|
| 669 | public static function checkBrowserIcab() |
|
| 670 | { |
|
| 671 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 672 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 673 | if (isset($aversion[1])) { |
|
| 674 | self::$browser->setVersion($aversion[1]); |
|
| 675 | } |
|
| 676 | self::$browser->setName(Browser::ICAB); |
|
| 677 | ||
| 678 | return true; |
|
| 679 | } |
|
| 680 | ||
| 681 | return false; |
|
| 682 | } |
|
| 683 | ||
| 684 | /** |
|
| 685 | * Determine if the browser is OmniWeb. |
|
| @@ 689-701 (lines=13) @@ | ||
| 686 | * |
|
| 687 | * @return bool |
|
| 688 | */ |
|
| 689 | public static function checkBrowserOmniWeb() |
|
| 690 | { |
|
| 691 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 692 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 693 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 694 | self::$browser->setVersion($aversion[0]); |
|
| 695 | self::$browser->setName(Browser::OMNIWEB); |
|
| 696 | ||
| 697 | return true; |
|
| 698 | } |
|
| 699 | ||
| 700 | return false; |
|
| 701 | } |
|
| 702 | ||
| 703 | /** |
|
| 704 | * Determine if the browser is Phoenix. |
|
| @@ 895-909 (lines=15) @@ | ||
| 892 | * |
|
| 893 | * @return bool |
|
| 894 | */ |
|
| 895 | public static function checkBrowserIceweasel() |
|
| 896 | { |
|
| 897 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 898 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 899 | if (isset($aresult[1])) { |
|
| 900 | $aversion = explode(' ', $aresult[1]); |
|
| 901 | self::$browser->setVersion($aversion[0]); |
|
| 902 | } |
|
| 903 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 904 | ||
| 905 | return true; |
|
| 906 | } |
|
| 907 | ||
| 908 | return false; |
|
| 909 | } |
|
| 910 | ||
| 911 | /** |
|
| 912 | * Determine if the browser is Mozilla. |
|
| @@ 957-969 (lines=13) @@ | ||
| 954 | * |
|
| 955 | * @return bool |
|
| 956 | */ |
|
| 957 | public static function checkBrowserLynx() |
|
| 958 | { |
|
| 959 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 960 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 961 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 962 | self::$browser->setVersion($aversion[0]); |
|
| 963 | self::$browser->setName(Browser::LYNX); |
|
| 964 | ||
| 965 | return true; |
|
| 966 | } |
|
| 967 | ||
| 968 | return false; |
|
| 969 | } |
|
| 970 | ||
| 971 | /** |
|
| 972 | * Determine if the browser is Amaya. |
|
| @@ 976-990 (lines=15) @@ | ||
| 973 | * |
|
| 974 | * @return bool |
|
| 975 | */ |
|
| 976 | public static function checkBrowserAmaya() |
|
| 977 | { |
|
| 978 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 979 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 980 | if (isset($aresult[1])) { |
|
| 981 | $aversion = explode(' ', $aresult[1]); |
|
| 982 | self::$browser->setVersion($aversion[0]); |
|
| 983 | } |
|
| 984 | self::$browser->setName(Browser::AMAYA); |
|
| 985 | ||
| 986 | return true; |
|
| 987 | } |
|
| 988 | ||
| 989 | return false; |
|
| 990 | } |
|
| 991 | ||
| 992 | ||
| 993 | /** |
|
| @@ 1021-1035 (lines=15) @@ | ||
| 1018 | * |
|
| 1019 | * @return bool |
|
| 1020 | */ |
|
| 1021 | public static function checkBrowserYandex() |
|
| 1022 | { |
|
| 1023 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 1024 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 1025 | if (isset($aresult[1])) { |
|
| 1026 | $aversion = explode(' ', $aresult[1]); |
|
| 1027 | self::$browser->setVersion($aversion[0]); |
|
| 1028 | } |
|
| 1029 | self::$browser->setName(Browser::YANDEX); |
|
| 1030 | ||
| 1031 | return true; |
|
| 1032 | } |
|
| 1033 | ||
| 1034 | return false; |
|
| 1035 | } |
|
| 1036 | ||
| 1037 | /** |
|
| 1038 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
| @@ 1042-1056 (lines=15) @@ | ||
| 1039 | * |
|
| 1040 | * @return bool |
|
| 1041 | */ |
|
| 1042 | public static function checkBrowserDragon() |
|
| 1043 | { |
|
| 1044 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
| 1045 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
| 1046 | if (isset($aresult[1])) { |
|
| 1047 | $aversion = explode(' ', $aresult[1]); |
|
| 1048 | self::$browser->setVersion($aversion[0]); |
|
| 1049 | } |
|
| 1050 | self::$browser->setName(Browser::DRAGON); |
|
| 1051 | ||
| 1052 | return true; |
|
| 1053 | } |
|
| 1054 | ||
| 1055 | return false; |
|
| 1056 | } |
|
| 1057 | ||
| 1058 | /** |
|
| 1059 | * Determine if the browser is Android. |
|
| @@ 1099-1114 (lines=16) @@ | ||
| 1096 | * |
|
| 1097 | * @return bool |
|
| 1098 | */ |
|
| 1099 | public static function checkBrowserUCBrowser() |
|
| 1100 | { |
|
| 1101 | // Navigator |
|
| 1102 | if (stripos(self::$userAgentString, 'UCBrowser/') !== false) { |
|
| 1103 | $aresult = explode('/', stristr(self::$userAgentString, 'UCBrowser')); |
|
| 1104 | if (isset($aresult[1])) { |
|
| 1105 | $aversion = explode(' ', $aresult[1]); |
|
| 1106 | self::$browser->setVersion($aversion[0]); |
|
| 1107 | } |
|
| 1108 | self::$browser->setName(Browser::UCBROWSER); |
|
| 1109 | ||
| 1110 | return true; |
|
| 1111 | } |
|
| 1112 | ||
| 1113 | return false; |
|
| 1114 | } |
|
| 1115 | ||
| 1116 | /** |
|
| 1117 | * Determine if the browser is Windows Media Player. |
|
| @@ 1121-1136 (lines=16) @@ | ||
| 1118 | * |
|
| 1119 | * @return bool |
|
| 1120 | */ |
|
| 1121 | public static function checkBrowserNSPlayer() |
|
| 1122 | { |
|
| 1123 | // Navigator |
|
| 1124 | if (stripos(self::$userAgentString, 'NSPlayer/') !== false) { |
|
| 1125 | $aresult = explode('/', stristr(self::$userAgentString, 'NSPlayer')); |
|
| 1126 | if (isset($aresult[1])) { |
|
| 1127 | $aversion = explode(' ', $aresult[1]); |
|
| 1128 | self::$browser->setVersion($aversion[0]); |
|
| 1129 | } |
|
| 1130 | self::$browser->setName(Browser::NSPLAYER); |
|
| 1131 | ||
| 1132 | return true; |
|
| 1133 | } |
|
| 1134 | ||
| 1135 | return false; |
|
| 1136 | } |
|
| 1137 | ||
| 1138 | /** |
|
| 1139 | * Determine if the browser is Microsoft Office. |
|