@@ 409-423 (lines=15) @@ | ||
406 | * |
|
407 | * @return bool |
|
408 | */ |
|
409 | public static function checkBrowserSamsung() |
|
410 | { |
|
411 | if (stripos(self::$userAgentString, 'SamsungBrowser') !== false) { |
|
412 | $aresult = explode('/', stristr(self::$userAgentString, 'SamsungBrowser')); |
|
413 | if (isset($aresult[1])) { |
|
414 | $aversion = explode(' ', $aresult[1]); |
|
415 | self::$browser->setVersion($aversion[0]); |
|
416 | } |
|
417 | self::$browser->setName(Browser::SAMSUNG_BROWSER); |
|
418 | ||
419 | return true; |
|
420 | } |
|
421 | ||
422 | return false; |
|
423 | } |
|
424 | ||
425 | /** |
|
426 | * Determine if the browser is Chrome. |
|
@@ 460-474 (lines=15) @@ | ||
457 | * |
|
458 | * @return bool |
|
459 | */ |
|
460 | public static function checkBrowserVivaldi() |
|
461 | { |
|
462 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
463 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
464 | if (isset($aresult[1])) { |
|
465 | $aversion = explode(' ', $aresult[1]); |
|
466 | self::$browser->setVersion($aversion[0]); |
|
467 | } |
|
468 | self::$browser->setName(Browser::VIVALDI); |
|
469 | ||
470 | return true; |
|
471 | } |
|
472 | ||
473 | return false; |
|
474 | } |
|
475 | ||
476 | /** |
|
477 | * Determine if the browser is Microsoft Edge. |
|
@@ 506-520 (lines=15) @@ | ||
503 | * |
|
504 | * @return bool |
|
505 | */ |
|
506 | public static function checkBrowserGsa() |
|
507 | { |
|
508 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
509 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
510 | if (isset($aresult[1])) { |
|
511 | $aversion = explode(' ', $aresult[1]); |
|
512 | self::$browser->setVersion($aversion[0]); |
|
513 | } |
|
514 | self::$browser->setName(Browser::GSA); |
|
515 | ||
516 | return true; |
|
517 | } |
|
518 | ||
519 | return false; |
|
520 | } |
|
521 | ||
522 | /** |
|
523 | * Determine if the browser is WebTv. |
|
@@ 527-541 (lines=15) @@ | ||
524 | * |
|
525 | * @return bool |
|
526 | */ |
|
527 | public static function checkBrowserWebTv() |
|
528 | { |
|
529 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
530 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
531 | if (isset($aresult[1])) { |
|
532 | $aversion = explode(' ', $aresult[1]); |
|
533 | self::$browser->setVersion($aversion[0]); |
|
534 | } |
|
535 | self::$browser->setName(Browser::WEBTV); |
|
536 | ||
537 | return true; |
|
538 | } |
|
539 | ||
540 | return false; |
|
541 | } |
|
542 | ||
543 | /** |
|
544 | * Determine if the browser is NetPositive. |
|
@@ 569-583 (lines=15) @@ | ||
566 | * |
|
567 | * @return bool |
|
568 | */ |
|
569 | public static function checkBrowserGaleon() |
|
570 | { |
|
571 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
572 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
573 | $aversion = explode('/', $aresult[0]); |
|
574 | if (isset($aversion[1])) { |
|
575 | self::$browser->setVersion($aversion[1]); |
|
576 | } |
|
577 | self::$browser->setName(Browser::GALEON); |
|
578 | ||
579 | return true; |
|
580 | } |
|
581 | ||
582 | return false; |
|
583 | } |
|
584 | ||
585 | /** |
|
586 | * Determine if the browser is Konqueror. |
|
@@ 590-604 (lines=15) @@ | ||
587 | * |
|
588 | * @return bool |
|
589 | */ |
|
590 | public static function checkBrowserKonqueror() |
|
591 | { |
|
592 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
593 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
594 | $aversion = explode('/', $aresult[0]); |
|
595 | if (isset($aversion[1])) { |
|
596 | self::$browser->setVersion($aversion[1]); |
|
597 | } |
|
598 | self::$browser->setName(Browser::KONQUEROR); |
|
599 | ||
600 | return true; |
|
601 | } |
|
602 | ||
603 | return false; |
|
604 | } |
|
605 | ||
606 | /** |
|
607 | * Determine if the browser is iCab. |
|
@@ 611-624 (lines=14) @@ | ||
608 | * |
|
609 | * @return bool |
|
610 | */ |
|
611 | public static function checkBrowserIcab() |
|
612 | { |
|
613 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
614 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
615 | if (isset($aversion[1])) { |
|
616 | self::$browser->setVersion($aversion[1]); |
|
617 | } |
|
618 | self::$browser->setName(Browser::ICAB); |
|
619 | ||
620 | return true; |
|
621 | } |
|
622 | ||
623 | return false; |
|
624 | } |
|
625 | ||
626 | /** |
|
627 | * Determine if the browser is OmniWeb. |
|
@@ 631-643 (lines=13) @@ | ||
628 | * |
|
629 | * @return bool |
|
630 | */ |
|
631 | public static function checkBrowserOmniWeb() |
|
632 | { |
|
633 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
634 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
635 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
636 | self::$browser->setVersion($aversion[0]); |
|
637 | self::$browser->setName(Browser::OMNIWEB); |
|
638 | ||
639 | return true; |
|
640 | } |
|
641 | ||
642 | return false; |
|
643 | } |
|
644 | ||
645 | /** |
|
646 | * Determine if the browser is Phoenix. |
|
@@ 837-851 (lines=15) @@ | ||
834 | * |
|
835 | * @return bool |
|
836 | */ |
|
837 | public static function checkBrowserIceweasel() |
|
838 | { |
|
839 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
840 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
841 | if (isset($aresult[1])) { |
|
842 | $aversion = explode(' ', $aresult[1]); |
|
843 | self::$browser->setVersion($aversion[0]); |
|
844 | } |
|
845 | self::$browser->setName(Browser::ICEWEASEL); |
|
846 | ||
847 | return true; |
|
848 | } |
|
849 | ||
850 | return false; |
|
851 | } |
|
852 | ||
853 | /** |
|
854 | * Determine if the browser is Mozilla. |
|
@@ 899-911 (lines=13) @@ | ||
896 | * |
|
897 | * @return bool |
|
898 | */ |
|
899 | public static function checkBrowserLynx() |
|
900 | { |
|
901 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
902 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
903 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
904 | self::$browser->setVersion($aversion[0]); |
|
905 | self::$browser->setName(Browser::LYNX); |
|
906 | ||
907 | return true; |
|
908 | } |
|
909 | ||
910 | return false; |
|
911 | } |
|
912 | ||
913 | /** |
|
914 | * Determine if the browser is Amaya. |
|
@@ 918-932 (lines=15) @@ | ||
915 | * |
|
916 | * @return bool |
|
917 | */ |
|
918 | public static function checkBrowserAmaya() |
|
919 | { |
|
920 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
921 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
922 | if (isset($aresult[1])) { |
|
923 | $aversion = explode(' ', $aresult[1]); |
|
924 | self::$browser->setVersion($aversion[0]); |
|
925 | } |
|
926 | self::$browser->setName(Browser::AMAYA); |
|
927 | ||
928 | return true; |
|
929 | } |
|
930 | ||
931 | return false; |
|
932 | } |
|
933 | ||
934 | ||
935 | /** |
|
@@ 963-977 (lines=15) @@ | ||
960 | * |
|
961 | * @return bool |
|
962 | */ |
|
963 | public static function checkBrowserYandex() |
|
964 | { |
|
965 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
966 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
967 | if (isset($aresult[1])) { |
|
968 | $aversion = explode(' ', $aresult[1]); |
|
969 | self::$browser->setVersion($aversion[0]); |
|
970 | } |
|
971 | self::$browser->setName(Browser::YANDEX); |
|
972 | ||
973 | return true; |
|
974 | } |
|
975 | ||
976 | return false; |
|
977 | } |
|
978 | ||
979 | /** |
|
980 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
@@ 984-998 (lines=15) @@ | ||
981 | * |
|
982 | * @return bool |
|
983 | */ |
|
984 | public static function checkBrowserDragon() |
|
985 | { |
|
986 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
987 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
988 | if (isset($aresult[1])) { |
|
989 | $aversion = explode(' ', $aresult[1]); |
|
990 | self::$browser->setVersion($aversion[0]); |
|
991 | } |
|
992 | self::$browser->setName(Browser::DRAGON); |
|
993 | ||
994 | return true; |
|
995 | } |
|
996 | ||
997 | return false; |
|
998 | } |
|
999 | ||
1000 | /** |
|
1001 | * Determine if the browser is Android. |
|
@@ 1041-1056 (lines=16) @@ | ||
1038 | * |
|
1039 | * @return bool |
|
1040 | */ |
|
1041 | public static function checkBrowserUCBrowser() |
|
1042 | { |
|
1043 | // Navigator |
|
1044 | if (stripos(self::$userAgentString, 'UCBrowser/') !== false) { |
|
1045 | $aresult = explode('/', stristr(self::$userAgentString, 'UCBrowser')); |
|
1046 | if (isset($aresult[1])) { |
|
1047 | $aversion = explode(' ', $aresult[1]); |
|
1048 | self::$browser->setVersion($aversion[0]); |
|
1049 | } |
|
1050 | self::$browser->setName(Browser::UCBROWSER); |
|
1051 | ||
1052 | return true; |
|
1053 | } |
|
1054 | ||
1055 | return false; |
|
1056 | } |
|
1057 | ||
1058 | /** |
|
1059 | * Determine if the browser is Windows Media Player. |
|
@@ 1063-1078 (lines=16) @@ | ||
1060 | * |
|
1061 | * @return bool |
|
1062 | */ |
|
1063 | public static function checkBrowserNSPlayer() |
|
1064 | { |
|
1065 | // Navigator |
|
1066 | if (stripos(self::$userAgentString, 'NSPlayer/') !== false) { |
|
1067 | $aresult = explode('/', stristr(self::$userAgentString, 'NSPlayer')); |
|
1068 | if (isset($aresult[1])) { |
|
1069 | $aversion = explode(' ', $aresult[1]); |
|
1070 | self::$browser->setVersion($aversion[0]); |
|
1071 | } |
|
1072 | self::$browser->setName(Browser::NSPLAYER); |
|
1073 | ||
1074 | return true; |
|
1075 | } |
|
1076 | ||
1077 | return false; |
|
1078 | } |
|
1079 | ||
1080 | /** |
|
1081 | * Determine if the browser is Microsoft Office. |