@@ 399-413 (lines=15) @@ | ||
396 | * |
|
397 | * @return bool |
|
398 | */ |
|
399 | public static function checkBrowserSamsung() |
|
400 | { |
|
401 | if (stripos(self::$userAgentString, 'SamsungBrowser') !== false) { |
|
402 | $aresult = explode('/', stristr(self::$userAgentString, 'SamsungBrowser')); |
|
403 | if (isset($aresult[1])) { |
|
404 | $aversion = explode(' ', $aresult[1]); |
|
405 | self::$browser->setVersion($aversion[0]); |
|
406 | } |
|
407 | self::$browser->setName(Browser::SAMSUNG_BROWSER); |
|
408 | ||
409 | return true; |
|
410 | } |
|
411 | ||
412 | return false; |
|
413 | } |
|
414 | ||
415 | /** |
|
416 | * Determine if the browser is Chrome. |
|
@@ 450-464 (lines=15) @@ | ||
447 | * |
|
448 | * @return bool |
|
449 | */ |
|
450 | public static function checkBrowserVivaldi() |
|
451 | { |
|
452 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
453 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
454 | if (isset($aresult[1])) { |
|
455 | $aversion = explode(' ', $aresult[1]); |
|
456 | self::$browser->setVersion($aversion[0]); |
|
457 | } |
|
458 | self::$browser->setName(Browser::VIVALDI); |
|
459 | ||
460 | return true; |
|
461 | } |
|
462 | ||
463 | return false; |
|
464 | } |
|
465 | ||
466 | /** |
|
467 | * Determine if the browser is Microsoft Edge. |
|
@@ 491-505 (lines=15) @@ | ||
488 | * |
|
489 | * @return bool |
|
490 | */ |
|
491 | public static function checkBrowserGsa() |
|
492 | { |
|
493 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
494 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
495 | if (isset($aresult[1])) { |
|
496 | $aversion = explode(' ', $aresult[1]); |
|
497 | self::$browser->setVersion($aversion[0]); |
|
498 | } |
|
499 | self::$browser->setName(Browser::GSA); |
|
500 | ||
501 | return true; |
|
502 | } |
|
503 | ||
504 | return false; |
|
505 | } |
|
506 | ||
507 | /** |
|
508 | * Determine if the browser is WebTv. |
|
@@ 512-526 (lines=15) @@ | ||
509 | * |
|
510 | * @return bool |
|
511 | */ |
|
512 | public static function checkBrowserWebTv() |
|
513 | { |
|
514 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
515 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
516 | if (isset($aresult[1])) { |
|
517 | $aversion = explode(' ', $aresult[1]); |
|
518 | self::$browser->setVersion($aversion[0]); |
|
519 | } |
|
520 | self::$browser->setName(Browser::WEBTV); |
|
521 | ||
522 | return true; |
|
523 | } |
|
524 | ||
525 | return false; |
|
526 | } |
|
527 | ||
528 | /** |
|
529 | * Determine if the browser is NetPositive. |
|
@@ 554-568 (lines=15) @@ | ||
551 | * |
|
552 | * @return bool |
|
553 | */ |
|
554 | public static function checkBrowserGaleon() |
|
555 | { |
|
556 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
557 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
558 | $aversion = explode('/', $aresult[0]); |
|
559 | if (isset($aversion[1])) { |
|
560 | self::$browser->setVersion($aversion[1]); |
|
561 | } |
|
562 | self::$browser->setName(Browser::GALEON); |
|
563 | ||
564 | return true; |
|
565 | } |
|
566 | ||
567 | return false; |
|
568 | } |
|
569 | ||
570 | /** |
|
571 | * Determine if the browser is Konqueror. |
|
@@ 575-589 (lines=15) @@ | ||
572 | * |
|
573 | * @return bool |
|
574 | */ |
|
575 | public static function checkBrowserKonqueror() |
|
576 | { |
|
577 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
578 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
579 | $aversion = explode('/', $aresult[0]); |
|
580 | if (isset($aversion[1])) { |
|
581 | self::$browser->setVersion($aversion[1]); |
|
582 | } |
|
583 | self::$browser->setName(Browser::KONQUEROR); |
|
584 | ||
585 | return true; |
|
586 | } |
|
587 | ||
588 | return false; |
|
589 | } |
|
590 | ||
591 | /** |
|
592 | * Determine if the browser is iCab. |
|
@@ 596-609 (lines=14) @@ | ||
593 | * |
|
594 | * @return bool |
|
595 | */ |
|
596 | public static function checkBrowserIcab() |
|
597 | { |
|
598 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
599 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
600 | if (isset($aversion[1])) { |
|
601 | self::$browser->setVersion($aversion[1]); |
|
602 | } |
|
603 | self::$browser->setName(Browser::ICAB); |
|
604 | ||
605 | return true; |
|
606 | } |
|
607 | ||
608 | return false; |
|
609 | } |
|
610 | ||
611 | /** |
|
612 | * Determine if the browser is OmniWeb. |
|
@@ 616-628 (lines=13) @@ | ||
613 | * |
|
614 | * @return bool |
|
615 | */ |
|
616 | public static function checkBrowserOmniWeb() |
|
617 | { |
|
618 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
619 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
620 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
621 | self::$browser->setVersion($aversion[0]); |
|
622 | self::$browser->setName(Browser::OMNIWEB); |
|
623 | ||
624 | return true; |
|
625 | } |
|
626 | ||
627 | return false; |
|
628 | } |
|
629 | ||
630 | /** |
|
631 | * Determine if the browser is Phoenix. |
|
@@ 822-836 (lines=15) @@ | ||
819 | * |
|
820 | * @return bool |
|
821 | */ |
|
822 | public static function checkBrowserIceweasel() |
|
823 | { |
|
824 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
825 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
826 | if (isset($aresult[1])) { |
|
827 | $aversion = explode(' ', $aresult[1]); |
|
828 | self::$browser->setVersion($aversion[0]); |
|
829 | } |
|
830 | self::$browser->setName(Browser::ICEWEASEL); |
|
831 | ||
832 | return true; |
|
833 | } |
|
834 | ||
835 | return false; |
|
836 | } |
|
837 | ||
838 | /** |
|
839 | * Determine if the browser is Mozilla. |
|
@@ 884-896 (lines=13) @@ | ||
881 | * |
|
882 | * @return bool |
|
883 | */ |
|
884 | public static function checkBrowserLynx() |
|
885 | { |
|
886 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
887 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
888 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
889 | self::$browser->setVersion($aversion[0]); |
|
890 | self::$browser->setName(Browser::LYNX); |
|
891 | ||
892 | return true; |
|
893 | } |
|
894 | ||
895 | return false; |
|
896 | } |
|
897 | ||
898 | /** |
|
899 | * Determine if the browser is Amaya. |
|
@@ 903-917 (lines=15) @@ | ||
900 | * |
|
901 | * @return bool |
|
902 | */ |
|
903 | public static function checkBrowserAmaya() |
|
904 | { |
|
905 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
906 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
907 | if (isset($aresult[1])) { |
|
908 | $aversion = explode(' ', $aresult[1]); |
|
909 | self::$browser->setVersion($aversion[0]); |
|
910 | } |
|
911 | self::$browser->setName(Browser::AMAYA); |
|
912 | ||
913 | return true; |
|
914 | } |
|
915 | ||
916 | return false; |
|
917 | } |
|
918 | ||
919 | ||
920 | /** |
|
@@ 948-962 (lines=15) @@ | ||
945 | * |
|
946 | * @return bool |
|
947 | */ |
|
948 | public static function checkBrowserYandex() |
|
949 | { |
|
950 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
951 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
952 | if (isset($aresult[1])) { |
|
953 | $aversion = explode(' ', $aresult[1]); |
|
954 | self::$browser->setVersion($aversion[0]); |
|
955 | } |
|
956 | self::$browser->setName(Browser::YANDEX); |
|
957 | ||
958 | return true; |
|
959 | } |
|
960 | ||
961 | return false; |
|
962 | } |
|
963 | ||
964 | /** |
|
965 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
@@ 969-983 (lines=15) @@ | ||
966 | * |
|
967 | * @return bool |
|
968 | */ |
|
969 | public static function checkBrowserDragon() |
|
970 | { |
|
971 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
972 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
973 | if (isset($aresult[1])) { |
|
974 | $aversion = explode(' ', $aresult[1]); |
|
975 | self::$browser->setVersion($aversion[0]); |
|
976 | } |
|
977 | self::$browser->setName(Browser::DRAGON); |
|
978 | ||
979 | return true; |
|
980 | } |
|
981 | ||
982 | return false; |
|
983 | } |
|
984 | ||
985 | /** |
|
986 | * Determine if the browser is Android. |
|
@@ 1026-1041 (lines=16) @@ | ||
1023 | * |
|
1024 | * @return bool |
|
1025 | */ |
|
1026 | public static function checkBrowserUCBrowser() |
|
1027 | { |
|
1028 | // Navigator |
|
1029 | if (stripos(self::$userAgentString, 'UCBrowser/') !== false) { |
|
1030 | $aresult = explode('/', stristr(self::$userAgentString, 'UCBrowser')); |
|
1031 | if (isset($aresult[1])) { |
|
1032 | $aversion = explode(' ', $aresult[1]); |
|
1033 | self::$browser->setVersion($aversion[0]); |
|
1034 | } |
|
1035 | self::$browser->setName(Browser::UCBROWSER); |
|
1036 | ||
1037 | return true; |
|
1038 | } |
|
1039 | ||
1040 | return false; |
|
1041 | } |
|
1042 | ||
1043 | /** |
|
1044 | * Determine if the browser is Windows Media Player. |
|
@@ 1048-1063 (lines=16) @@ | ||
1045 | * |
|
1046 | * @return bool |
|
1047 | */ |
|
1048 | public static function checkBrowserNSPlayer() |
|
1049 | { |
|
1050 | // Navigator |
|
1051 | if (stripos(self::$userAgentString, 'NSPlayer/') !== false) { |
|
1052 | $aresult = explode('/', stristr(self::$userAgentString, 'NSPlayer')); |
|
1053 | if (isset($aresult[1])) { |
|
1054 | $aversion = explode(' ', $aresult[1]); |
|
1055 | self::$browser->setVersion($aversion[0]); |
|
1056 | } |
|
1057 | self::$browser->setName(Browser::NSPLAYER); |
|
1058 | ||
1059 | return true; |
|
1060 | } |
|
1061 | ||
1062 | return false; |
|
1063 | } |
|
1064 | ||
1065 | /** |
|
1066 | * Determine if the browser is Microsoft Office. |