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