| @@ 403-417 (lines=15) @@ | ||
| 400 | * |
|
| 401 | * @return bool |
|
| 402 | */ |
|
| 403 | public static function checkBrowserVivaldi() |
|
| 404 | { |
|
| 405 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 406 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 407 | if (isset($aresult[1])) { |
|
| 408 | $aversion = explode(' ', $aresult[1]); |
|
| 409 | self::$browser->setVersion($aversion[0]); |
|
| 410 | } |
|
| 411 | self::$browser->setName(Browser::VIVALDI); |
|
| 412 | ||
| 413 | return true; |
|
| 414 | } |
|
| 415 | ||
| 416 | return false; |
|
| 417 | } |
|
| 418 | ||
| 419 | /** |
|
| 420 | * Determine if the browser is Microsoft Edge. |
|
| @@ 444-458 (lines=15) @@ | ||
| 441 | * |
|
| 442 | * @return bool |
|
| 443 | */ |
|
| 444 | public static function checkBrowserGsa() |
|
| 445 | { |
|
| 446 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 447 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 448 | if (isset($aresult[1])) { |
|
| 449 | $aversion = explode(' ', $aresult[1]); |
|
| 450 | self::$browser->setVersion($aversion[0]); |
|
| 451 | } |
|
| 452 | self::$browser->setName(Browser::GSA); |
|
| 453 | ||
| 454 | return true; |
|
| 455 | } |
|
| 456 | ||
| 457 | return false; |
|
| 458 | } |
|
| 459 | ||
| 460 | /** |
|
| 461 | * Determine if the browser is WebTv. |
|
| @@ 465-479 (lines=15) @@ | ||
| 462 | * |
|
| 463 | * @return bool |
|
| 464 | */ |
|
| 465 | public static function checkBrowserWebTv() |
|
| 466 | { |
|
| 467 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 468 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 469 | if (isset($aresult[1])) { |
|
| 470 | $aversion = explode(' ', $aresult[1]); |
|
| 471 | self::$browser->setVersion($aversion[0]); |
|
| 472 | } |
|
| 473 | self::$browser->setName(Browser::WEBTV); |
|
| 474 | ||
| 475 | return true; |
|
| 476 | } |
|
| 477 | ||
| 478 | return false; |
|
| 479 | } |
|
| 480 | ||
| 481 | /** |
|
| 482 | * Determine if the browser is NetPositive. |
|
| @@ 507-521 (lines=15) @@ | ||
| 504 | * |
|
| 505 | * @return bool |
|
| 506 | */ |
|
| 507 | public static function checkBrowserGaleon() |
|
| 508 | { |
|
| 509 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 510 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 511 | $aversion = explode('/', $aresult[0]); |
|
| 512 | if (isset($aversion[1])) { |
|
| 513 | self::$browser->setVersion($aversion[1]); |
|
| 514 | } |
|
| 515 | self::$browser->setName(Browser::GALEON); |
|
| 516 | ||
| 517 | return true; |
|
| 518 | } |
|
| 519 | ||
| 520 | return false; |
|
| 521 | } |
|
| 522 | ||
| 523 | /** |
|
| 524 | * Determine if the browser is Konqueror. |
|
| @@ 528-542 (lines=15) @@ | ||
| 525 | * |
|
| 526 | * @return bool |
|
| 527 | */ |
|
| 528 | public static function checkBrowserKonqueror() |
|
| 529 | { |
|
| 530 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 531 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 532 | $aversion = explode('/', $aresult[0]); |
|
| 533 | if (isset($aversion[1])) { |
|
| 534 | self::$browser->setVersion($aversion[1]); |
|
| 535 | } |
|
| 536 | self::$browser->setName(Browser::KONQUEROR); |
|
| 537 | ||
| 538 | return true; |
|
| 539 | } |
|
| 540 | ||
| 541 | return false; |
|
| 542 | } |
|
| 543 | ||
| 544 | /** |
|
| 545 | * Determine if the browser is iCab. |
|
| @@ 549-562 (lines=14) @@ | ||
| 546 | * |
|
| 547 | * @return bool |
|
| 548 | */ |
|
| 549 | public static function checkBrowserIcab() |
|
| 550 | { |
|
| 551 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 552 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 553 | if (isset($aversion[1])) { |
|
| 554 | self::$browser->setVersion($aversion[1]); |
|
| 555 | } |
|
| 556 | self::$browser->setName(Browser::ICAB); |
|
| 557 | ||
| 558 | return true; |
|
| 559 | } |
|
| 560 | ||
| 561 | return false; |
|
| 562 | } |
|
| 563 | ||
| 564 | /** |
|
| 565 | * Determine if the browser is OmniWeb. |
|
| @@ 569-581 (lines=13) @@ | ||
| 566 | * |
|
| 567 | * @return bool |
|
| 568 | */ |
|
| 569 | public static function checkBrowserOmniWeb() |
|
| 570 | { |
|
| 571 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 572 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 573 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 574 | self::$browser->setVersion($aversion[0]); |
|
| 575 | self::$browser->setName(Browser::OMNIWEB); |
|
| 576 | ||
| 577 | return true; |
|
| 578 | } |
|
| 579 | ||
| 580 | return false; |
|
| 581 | } |
|
| 582 | ||
| 583 | /** |
|
| 584 | * Determine if the browser is Phoenix. |
|
| @@ 775-789 (lines=15) @@ | ||
| 772 | * |
|
| 773 | * @return bool |
|
| 774 | */ |
|
| 775 | public static function checkBrowserIceweasel() |
|
| 776 | { |
|
| 777 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 778 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 779 | if (isset($aresult[1])) { |
|
| 780 | $aversion = explode(' ', $aresult[1]); |
|
| 781 | self::$browser->setVersion($aversion[0]); |
|
| 782 | } |
|
| 783 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 784 | ||
| 785 | return true; |
|
| 786 | } |
|
| 787 | ||
| 788 | return false; |
|
| 789 | } |
|
| 790 | ||
| 791 | /** |
|
| 792 | * Determine if the browser is Mozilla. |
|
| @@ 837-849 (lines=13) @@ | ||
| 834 | * |
|
| 835 | * @return bool |
|
| 836 | */ |
|
| 837 | public static function checkBrowserLynx() |
|
| 838 | { |
|
| 839 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 840 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 841 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 842 | self::$browser->setVersion($aversion[0]); |
|
| 843 | self::$browser->setName(Browser::LYNX); |
|
| 844 | ||
| 845 | return true; |
|
| 846 | } |
|
| 847 | ||
| 848 | return false; |
|
| 849 | } |
|
| 850 | ||
| 851 | /** |
|
| 852 | * Determine if the browser is Amaya. |
|
| @@ 856-870 (lines=15) @@ | ||
| 853 | * |
|
| 854 | * @return bool |
|
| 855 | */ |
|
| 856 | public static function checkBrowserAmaya() |
|
| 857 | { |
|
| 858 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 859 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 860 | if (isset($aresult[1])) { |
|
| 861 | $aversion = explode(' ', $aresult[1]); |
|
| 862 | self::$browser->setVersion($aversion[0]); |
|
| 863 | } |
|
| 864 | self::$browser->setName(Browser::AMAYA); |
|
| 865 | ||
| 866 | return true; |
|
| 867 | } |
|
| 868 | ||
| 869 | return false; |
|
| 870 | } |
|
| 871 | ||
| 872 | /** |
|
| 873 | * Determine if the browser is Safari. |
|
| @@ 900-914 (lines=15) @@ | ||
| 897 | * |
|
| 898 | * @return bool |
|
| 899 | */ |
|
| 900 | public static function checkBrowserYandex() |
|
| 901 | { |
|
| 902 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 903 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 904 | if (isset($aresult[1])) { |
|
| 905 | $aversion = explode(' ', $aresult[1]); |
|
| 906 | self::$browser->setVersion($aversion[0]); |
|
| 907 | } |
|
| 908 | self::$browser->setName(Browser::YANDEX); |
|
| 909 | ||
| 910 | return true; |
|
| 911 | } |
|
| 912 | ||
| 913 | return false; |
|
| 914 | } |
|
| 915 | ||
| 916 | /** |
|
| 917 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
| @@ 921-935 (lines=15) @@ | ||
| 918 | * |
|
| 919 | * @return bool |
|
| 920 | */ |
|
| 921 | public static function checkBrowserDragon() |
|
| 922 | { |
|
| 923 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
| 924 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
| 925 | if (isset($aresult[1])) { |
|
| 926 | $aversion = explode(' ', $aresult[1]); |
|
| 927 | self::$browser->setVersion($aversion[0]); |
|
| 928 | } |
|
| 929 | self::$browser->setName(Browser::DRAGON); |
|
| 930 | ||
| 931 | return true; |
|
| 932 | } |
|
| 933 | ||
| 934 | return false; |
|
| 935 | } |
|
| 936 | ||
| 937 | /** |
|
| 938 | * Determine if the browser is Android. |
|