| @@ 411-425 (lines=15) @@ | ||
| 408 | * |
|
| 409 | * @return bool |
|
| 410 | */ |
|
| 411 | public static function checkBrowserVivaldi() |
|
| 412 | { |
|
| 413 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 414 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 415 | if (isset($aresult[1])) { |
|
| 416 | $aversion = explode(' ', $aresult[1]); |
|
| 417 | self::$browser->setVersion($aversion[0]); |
|
| 418 | } |
|
| 419 | self::$browser->setName(Browser::VIVALDI); |
|
| 420 | ||
| 421 | return true; |
|
| 422 | } |
|
| 423 | ||
| 424 | return false; |
|
| 425 | } |
|
| 426 | ||
| 427 | /** |
|
| 428 | * Determine if the browser is Microsoft Edge. |
|
| @@ 452-466 (lines=15) @@ | ||
| 449 | * |
|
| 450 | * @return bool |
|
| 451 | */ |
|
| 452 | public static function checkBrowserGsa() |
|
| 453 | { |
|
| 454 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 455 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 456 | if (isset($aresult[1])) { |
|
| 457 | $aversion = explode(' ', $aresult[1]); |
|
| 458 | self::$browser->setVersion($aversion[0]); |
|
| 459 | } |
|
| 460 | self::$browser->setName(Browser::GSA); |
|
| 461 | ||
| 462 | return true; |
|
| 463 | } |
|
| 464 | ||
| 465 | return false; |
|
| 466 | } |
|
| 467 | ||
| 468 | /** |
|
| 469 | * Determine if the browser is WebTv. |
|
| @@ 473-487 (lines=15) @@ | ||
| 470 | * |
|
| 471 | * @return bool |
|
| 472 | */ |
|
| 473 | public static function checkBrowserWebTv() |
|
| 474 | { |
|
| 475 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 476 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 477 | if (isset($aresult[1])) { |
|
| 478 | $aversion = explode(' ', $aresult[1]); |
|
| 479 | self::$browser->setVersion($aversion[0]); |
|
| 480 | } |
|
| 481 | self::$browser->setName(Browser::WEBTV); |
|
| 482 | ||
| 483 | return true; |
|
| 484 | } |
|
| 485 | ||
| 486 | return false; |
|
| 487 | } |
|
| 488 | ||
| 489 | /** |
|
| 490 | * Determine if the browser is NetPositive. |
|
| @@ 515-529 (lines=15) @@ | ||
| 512 | * |
|
| 513 | * @return bool |
|
| 514 | */ |
|
| 515 | public static function checkBrowserGaleon() |
|
| 516 | { |
|
| 517 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 518 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 519 | $aversion = explode('/', $aresult[0]); |
|
| 520 | if (isset($aversion[1])) { |
|
| 521 | self::$browser->setVersion($aversion[1]); |
|
| 522 | } |
|
| 523 | self::$browser->setName(Browser::GALEON); |
|
| 524 | ||
| 525 | return true; |
|
| 526 | } |
|
| 527 | ||
| 528 | return false; |
|
| 529 | } |
|
| 530 | ||
| 531 | /** |
|
| 532 | * Determine if the browser is Konqueror. |
|
| @@ 536-550 (lines=15) @@ | ||
| 533 | * |
|
| 534 | * @return bool |
|
| 535 | */ |
|
| 536 | public static function checkBrowserKonqueror() |
|
| 537 | { |
|
| 538 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 539 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 540 | $aversion = explode('/', $aresult[0]); |
|
| 541 | if (isset($aversion[1])) { |
|
| 542 | self::$browser->setVersion($aversion[1]); |
|
| 543 | } |
|
| 544 | self::$browser->setName(Browser::KONQUEROR); |
|
| 545 | ||
| 546 | return true; |
|
| 547 | } |
|
| 548 | ||
| 549 | return false; |
|
| 550 | } |
|
| 551 | ||
| 552 | /** |
|
| 553 | * Determine if the browser is iCab. |
|
| @@ 557-570 (lines=14) @@ | ||
| 554 | * |
|
| 555 | * @return bool |
|
| 556 | */ |
|
| 557 | public static function checkBrowserIcab() |
|
| 558 | { |
|
| 559 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 560 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 561 | if (isset($aversion[1])) { |
|
| 562 | self::$browser->setVersion($aversion[1]); |
|
| 563 | } |
|
| 564 | self::$browser->setName(Browser::ICAB); |
|
| 565 | ||
| 566 | return true; |
|
| 567 | } |
|
| 568 | ||
| 569 | return false; |
|
| 570 | } |
|
| 571 | ||
| 572 | /** |
|
| 573 | * Determine if the browser is OmniWeb. |
|
| @@ 577-589 (lines=13) @@ | ||
| 574 | * |
|
| 575 | * @return bool |
|
| 576 | */ |
|
| 577 | public static function checkBrowserOmniWeb() |
|
| 578 | { |
|
| 579 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 580 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 581 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 582 | self::$browser->setVersion($aversion[0]); |
|
| 583 | self::$browser->setName(Browser::OMNIWEB); |
|
| 584 | ||
| 585 | return true; |
|
| 586 | } |
|
| 587 | ||
| 588 | return false; |
|
| 589 | } |
|
| 590 | ||
| 591 | /** |
|
| 592 | * Determine if the browser is Phoenix. |
|
| @@ 783-797 (lines=15) @@ | ||
| 780 | * |
|
| 781 | * @return bool |
|
| 782 | */ |
|
| 783 | public static function checkBrowserIceweasel() |
|
| 784 | { |
|
| 785 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 786 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 787 | if (isset($aresult[1])) { |
|
| 788 | $aversion = explode(' ', $aresult[1]); |
|
| 789 | self::$browser->setVersion($aversion[0]); |
|
| 790 | } |
|
| 791 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 792 | ||
| 793 | return true; |
|
| 794 | } |
|
| 795 | ||
| 796 | return false; |
|
| 797 | } |
|
| 798 | ||
| 799 | /** |
|
| 800 | * Determine if the browser is Mozilla. |
|
| @@ 845-857 (lines=13) @@ | ||
| 842 | * |
|
| 843 | * @return bool |
|
| 844 | */ |
|
| 845 | public static function checkBrowserLynx() |
|
| 846 | { |
|
| 847 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 848 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 849 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 850 | self::$browser->setVersion($aversion[0]); |
|
| 851 | self::$browser->setName(Browser::LYNX); |
|
| 852 | ||
| 853 | return true; |
|
| 854 | } |
|
| 855 | ||
| 856 | return false; |
|
| 857 | } |
|
| 858 | ||
| 859 | /** |
|
| 860 | * Determine if the browser is Amaya. |
|
| @@ 864-878 (lines=15) @@ | ||
| 861 | * |
|
| 862 | * @return bool |
|
| 863 | */ |
|
| 864 | public static function checkBrowserAmaya() |
|
| 865 | { |
|
| 866 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 867 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 868 | if (isset($aresult[1])) { |
|
| 869 | $aversion = explode(' ', $aresult[1]); |
|
| 870 | self::$browser->setVersion($aversion[0]); |
|
| 871 | } |
|
| 872 | self::$browser->setName(Browser::AMAYA); |
|
| 873 | ||
| 874 | return true; |
|
| 875 | } |
|
| 876 | ||
| 877 | return false; |
|
| 878 | } |
|
| 879 | ||
| 880 | /** |
|
| 881 | * Determine if the browser is Safari. |
|
| @@ 908-922 (lines=15) @@ | ||
| 905 | * |
|
| 906 | * @return bool |
|
| 907 | */ |
|
| 908 | public static function checkBrowserYandex() |
|
| 909 | { |
|
| 910 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 911 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 912 | if (isset($aresult[1])) { |
|
| 913 | $aversion = explode(' ', $aresult[1]); |
|
| 914 | self::$browser->setVersion($aversion[0]); |
|
| 915 | } |
|
| 916 | self::$browser->setName(Browser::YANDEX); |
|
| 917 | ||
| 918 | return true; |
|
| 919 | } |
|
| 920 | ||
| 921 | return false; |
|
| 922 | } |
|
| 923 | ||
| 924 | /** |
|
| 925 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
| @@ 929-943 (lines=15) @@ | ||
| 926 | * |
|
| 927 | * @return bool |
|
| 928 | */ |
|
| 929 | public static function checkBrowserDragon() |
|
| 930 | { |
|
| 931 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
| 932 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
| 933 | if (isset($aresult[1])) { |
|
| 934 | $aversion = explode(' ', $aresult[1]); |
|
| 935 | self::$browser->setVersion($aversion[0]); |
|
| 936 | } |
|
| 937 | self::$browser->setName(Browser::DRAGON); |
|
| 938 | ||
| 939 | return true; |
|
| 940 | } |
|
| 941 | ||
| 942 | return false; |
|
| 943 | } |
|
| 944 | ||
| 945 | /** |
|
| 946 | * Determine if the browser is Android. |
|