@@ 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. |
|
@@ 570-584 (lines=15) @@ | ||
567 | * |
|
568 | * @return bool |
|
569 | */ |
|
570 | public static function checkBrowserGsa() |
|
571 | { |
|
572 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
573 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
574 | if (isset($aresult[1])) { |
|
575 | $aversion = explode(' ', $aresult[1]); |
|
576 | self::$browser->setVersion($aversion[0]); |
|
577 | } |
|
578 | self::$browser->setName(Browser::GSA); |
|
579 | ||
580 | return true; |
|
581 | } |
|
582 | ||
583 | return false; |
|
584 | } |
|
585 | ||
586 | /** |
|
587 | * Determine if the browser is WebTv. |
|
@@ 591-605 (lines=15) @@ | ||
588 | * |
|
589 | * @return bool |
|
590 | */ |
|
591 | public static function checkBrowserWebTv() |
|
592 | { |
|
593 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
594 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
595 | if (isset($aresult[1])) { |
|
596 | $aversion = explode(' ', $aresult[1]); |
|
597 | self::$browser->setVersion($aversion[0]); |
|
598 | } |
|
599 | self::$browser->setName(Browser::WEBTV); |
|
600 | ||
601 | return true; |
|
602 | } |
|
603 | ||
604 | return false; |
|
605 | } |
|
606 | ||
607 | /** |
|
608 | * Determine if the browser is NetPositive. |
|
@@ 633-647 (lines=15) @@ | ||
630 | * |
|
631 | * @return bool |
|
632 | */ |
|
633 | public static function checkBrowserGaleon() |
|
634 | { |
|
635 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
636 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
637 | $aversion = explode('/', $aresult[0]); |
|
638 | if (isset($aversion[1])) { |
|
639 | self::$browser->setVersion($aversion[1]); |
|
640 | } |
|
641 | self::$browser->setName(Browser::GALEON); |
|
642 | ||
643 | return true; |
|
644 | } |
|
645 | ||
646 | return false; |
|
647 | } |
|
648 | ||
649 | /** |
|
650 | * Determine if the browser is Konqueror. |
|
@@ 654-668 (lines=15) @@ | ||
651 | * |
|
652 | * @return bool |
|
653 | */ |
|
654 | public static function checkBrowserKonqueror() |
|
655 | { |
|
656 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
657 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
658 | $aversion = explode('/', $aresult[0]); |
|
659 | if (isset($aversion[1])) { |
|
660 | self::$browser->setVersion($aversion[1]); |
|
661 | } |
|
662 | self::$browser->setName(Browser::KONQUEROR); |
|
663 | ||
664 | return true; |
|
665 | } |
|
666 | ||
667 | return false; |
|
668 | } |
|
669 | ||
670 | /** |
|
671 | * Determine if the browser is iCab. |
|
@@ 675-688 (lines=14) @@ | ||
672 | * |
|
673 | * @return bool |
|
674 | */ |
|
675 | public static function checkBrowserIcab() |
|
676 | { |
|
677 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
678 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
679 | if (isset($aversion[1])) { |
|
680 | self::$browser->setVersion($aversion[1]); |
|
681 | } |
|
682 | self::$browser->setName(Browser::ICAB); |
|
683 | ||
684 | return true; |
|
685 | } |
|
686 | ||
687 | return false; |
|
688 | } |
|
689 | ||
690 | /** |
|
691 | * Determine if the browser is OmniWeb. |
|
@@ 695-707 (lines=13) @@ | ||
692 | * |
|
693 | * @return bool |
|
694 | */ |
|
695 | public static function checkBrowserOmniWeb() |
|
696 | { |
|
697 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
698 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
699 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
700 | self::$browser->setVersion($aversion[0]); |
|
701 | self::$browser->setName(Browser::OMNIWEB); |
|
702 | ||
703 | return true; |
|
704 | } |
|
705 | ||
706 | return false; |
|
707 | } |
|
708 | ||
709 | /** |
|
710 | * Determine if the browser is Phoenix. |
|
@@ 901-915 (lines=15) @@ | ||
898 | * |
|
899 | * @return bool |
|
900 | */ |
|
901 | public static function checkBrowserIceweasel() |
|
902 | { |
|
903 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
904 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
905 | if (isset($aresult[1])) { |
|
906 | $aversion = explode(' ', $aresult[1]); |
|
907 | self::$browser->setVersion($aversion[0]); |
|
908 | } |
|
909 | self::$browser->setName(Browser::ICEWEASEL); |
|
910 | ||
911 | return true; |
|
912 | } |
|
913 | ||
914 | return false; |
|
915 | } |
|
916 | ||
917 | /** |
|
918 | * Determine if the browser is Mozilla. |
|
@@ 963-975 (lines=13) @@ | ||
960 | * |
|
961 | * @return bool |
|
962 | */ |
|
963 | public static function checkBrowserLynx() |
|
964 | { |
|
965 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
966 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
967 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
968 | self::$browser->setVersion($aversion[0]); |
|
969 | self::$browser->setName(Browser::LYNX); |
|
970 | ||
971 | return true; |
|
972 | } |
|
973 | ||
974 | return false; |
|
975 | } |
|
976 | ||
977 | /** |
|
978 | * Determine if the browser is Amaya. |
|
@@ 982-996 (lines=15) @@ | ||
979 | * |
|
980 | * @return bool |
|
981 | */ |
|
982 | public static function checkBrowserAmaya() |
|
983 | { |
|
984 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
985 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
986 | if (isset($aresult[1])) { |
|
987 | $aversion = explode(' ', $aresult[1]); |
|
988 | self::$browser->setVersion($aversion[0]); |
|
989 | } |
|
990 | self::$browser->setName(Browser::AMAYA); |
|
991 | ||
992 | return true; |
|
993 | } |
|
994 | ||
995 | return false; |
|
996 | } |
|
997 | ||
998 | ||
999 | /** |
|
@@ 1027-1041 (lines=15) @@ | ||
1024 | * |
|
1025 | * @return bool |
|
1026 | */ |
|
1027 | public static function checkBrowserYandex() |
|
1028 | { |
|
1029 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
1030 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
1031 | if (isset($aresult[1])) { |
|
1032 | $aversion = explode(' ', $aresult[1]); |
|
1033 | self::$browser->setVersion($aversion[0]); |
|
1034 | } |
|
1035 | self::$browser->setName(Browser::YANDEX); |
|
1036 | ||
1037 | return true; |
|
1038 | } |
|
1039 | ||
1040 | return false; |
|
1041 | } |
|
1042 | ||
1043 | /** |
|
1044 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
@@ 1048-1062 (lines=15) @@ | ||
1045 | * |
|
1046 | * @return bool |
|
1047 | */ |
|
1048 | public static function checkBrowserDragon() |
|
1049 | { |
|
1050 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
1051 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
1052 | if (isset($aresult[1])) { |
|
1053 | $aversion = explode(' ', $aresult[1]); |
|
1054 | self::$browser->setVersion($aversion[0]); |
|
1055 | } |
|
1056 | self::$browser->setName(Browser::DRAGON); |
|
1057 | ||
1058 | return true; |
|
1059 | } |
|
1060 | ||
1061 | return false; |
|
1062 | } |
|
1063 | ||
1064 | /** |
|
1065 | * Determine if the browser is Android. |
|
@@ 1105-1120 (lines=16) @@ | ||
1102 | * |
|
1103 | * @return bool |
|
1104 | */ |
|
1105 | public static function checkBrowserUCBrowser() |
|
1106 | { |
|
1107 | // Navigator |
|
1108 | if (stripos(self::$userAgentString, 'UCBrowser/') !== false) { |
|
1109 | $aresult = explode('/', stristr(self::$userAgentString, 'UCBrowser')); |
|
1110 | if (isset($aresult[1])) { |
|
1111 | $aversion = explode(' ', $aresult[1]); |
|
1112 | self::$browser->setVersion($aversion[0]); |
|
1113 | } |
|
1114 | self::$browser->setName(Browser::UCBROWSER); |
|
1115 | ||
1116 | return true; |
|
1117 | } |
|
1118 | ||
1119 | return false; |
|
1120 | } |
|
1121 | ||
1122 | /** |
|
1123 | * Determine if the browser is Windows Media Player. |
|
@@ 1127-1142 (lines=16) @@ | ||
1124 | * |
|
1125 | * @return bool |
|
1126 | */ |
|
1127 | public static function checkBrowserNSPlayer() |
|
1128 | { |
|
1129 | // Navigator |
|
1130 | if (stripos(self::$userAgentString, 'NSPlayer/') !== false) { |
|
1131 | $aresult = explode('/', stristr(self::$userAgentString, 'NSPlayer')); |
|
1132 | if (isset($aresult[1])) { |
|
1133 | $aversion = explode(' ', $aresult[1]); |
|
1134 | self::$browser->setVersion($aversion[0]); |
|
1135 | } |
|
1136 | self::$browser->setName(Browser::NSPLAYER); |
|
1137 | ||
1138 | return true; |
|
1139 | } |
|
1140 | ||
1141 | return false; |
|
1142 | } |
|
1143 | ||
1144 | /** |
|
1145 | * Determine if the browser is Microsoft Office. |