| @@ 123-137 (lines=15) @@ | ||
| 120 | * |
|
| 121 | * @return bool |
|
| 122 | */ |
|
| 123 | public static function checkBrowserBlackBerry() |
|
| 124 | { |
|
| 125 | if (stripos(self::$userAgentString, 'blackberry') !== false) { |
|
| 126 | $aresult = explode('/', stristr(self::$userAgentString, 'BlackBerry')); |
|
| 127 | if (isset($aresult[1])) { |
|
| 128 | $aversion = explode(' ', $aresult[1]); |
|
| 129 | self::$browser->setVersion($aversion[0]); |
|
| 130 | } |
|
| 131 | self::$browser->setName(Browser::BLACKBERRY); |
|
| 132 | ||
| 133 | return true; |
|
| 134 | } |
|
| 135 | ||
| 136 | return false; |
|
| 137 | } |
|
| 138 | ||
| 139 | /** |
|
| 140 | * Determine if the browser is a robot. |
|
| @@ 347-361 (lines=15) @@ | ||
| 344 | * |
|
| 345 | * @return bool |
|
| 346 | */ |
|
| 347 | public static function checkBrowserVivaldi() |
|
| 348 | { |
|
| 349 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 350 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 351 | if (isset($aresult[1])) { |
|
| 352 | $aversion = explode(' ', $aresult[1]); |
|
| 353 | self::$browser->setVersion($aversion[0]); |
|
| 354 | } |
|
| 355 | self::$browser->setName(Browser::VIVALDI); |
|
| 356 | ||
| 357 | return true; |
|
| 358 | } |
|
| 359 | ||
| 360 | return false; |
|
| 361 | } |
|
| 362 | ||
| 363 | /** |
|
| 364 | * Determine if the browser is Microsoft Edge. |
|
| @@ 388-402 (lines=15) @@ | ||
| 385 | * |
|
| 386 | * @return bool |
|
| 387 | */ |
|
| 388 | public static function checkBrowserGsa() |
|
| 389 | { |
|
| 390 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 391 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 392 | if (isset($aresult[1])) { |
|
| 393 | $aversion = explode(' ', $aresult[1]); |
|
| 394 | self::$browser->setVersion($aversion[0]); |
|
| 395 | } |
|
| 396 | self::$browser->setName(Browser::GSA); |
|
| 397 | ||
| 398 | return true; |
|
| 399 | } |
|
| 400 | ||
| 401 | return false; |
|
| 402 | } |
|
| 403 | ||
| 404 | /** |
|
| 405 | * Determine if the browser is WebTv. |
|
| @@ 409-423 (lines=15) @@ | ||
| 406 | * |
|
| 407 | * @return bool |
|
| 408 | */ |
|
| 409 | public static function checkBrowserWebTv() |
|
| 410 | { |
|
| 411 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 412 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 413 | if (isset($aresult[1])) { |
|
| 414 | $aversion = explode(' ', $aresult[1]); |
|
| 415 | self::$browser->setVersion($aversion[0]); |
|
| 416 | } |
|
| 417 | self::$browser->setName(Browser::WEBTV); |
|
| 418 | ||
| 419 | return true; |
|
| 420 | } |
|
| 421 | ||
| 422 | return false; |
|
| 423 | } |
|
| 424 | ||
| 425 | /** |
|
| 426 | * Determine if the browser is NetPositive. |
|
| @@ 451-465 (lines=15) @@ | ||
| 448 | * |
|
| 449 | * @return bool |
|
| 450 | */ |
|
| 451 | public static function checkBrowserGaleon() |
|
| 452 | { |
|
| 453 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 454 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 455 | $aversion = explode('/', $aresult[0]); |
|
| 456 | if (isset($aversion[1])) { |
|
| 457 | self::$browser->setVersion($aversion[1]); |
|
| 458 | } |
|
| 459 | self::$browser->setName(Browser::GALEON); |
|
| 460 | ||
| 461 | return true; |
|
| 462 | } |
|
| 463 | ||
| 464 | return false; |
|
| 465 | } |
|
| 466 | ||
| 467 | /** |
|
| 468 | * Determine if the browser is Konqueror. |
|
| @@ 472-486 (lines=15) @@ | ||
| 469 | * |
|
| 470 | * @return bool |
|
| 471 | */ |
|
| 472 | public static function checkBrowserKonqueror() |
|
| 473 | { |
|
| 474 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 475 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 476 | $aversion = explode('/', $aresult[0]); |
|
| 477 | if (isset($aversion[1])) { |
|
| 478 | self::$browser->setVersion($aversion[1]); |
|
| 479 | } |
|
| 480 | self::$browser->setName(Browser::KONQUEROR); |
|
| 481 | ||
| 482 | return true; |
|
| 483 | } |
|
| 484 | ||
| 485 | return false; |
|
| 486 | } |
|
| 487 | ||
| 488 | /** |
|
| 489 | * Determine if the browser is iCab. |
|
| @@ 493-506 (lines=14) @@ | ||
| 490 | * |
|
| 491 | * @return bool |
|
| 492 | */ |
|
| 493 | public static function checkBrowserIcab() |
|
| 494 | { |
|
| 495 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 496 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 497 | if (isset($aversion[1])) { |
|
| 498 | self::$browser->setVersion($aversion[1]); |
|
| 499 | } |
|
| 500 | self::$browser->setName(Browser::ICAB); |
|
| 501 | ||
| 502 | return true; |
|
| 503 | } |
|
| 504 | ||
| 505 | return false; |
|
| 506 | } |
|
| 507 | ||
| 508 | /** |
|
| 509 | * Determine if the browser is OmniWeb. |
|
| @@ 513-525 (lines=13) @@ | ||
| 510 | * |
|
| 511 | * @return bool |
|
| 512 | */ |
|
| 513 | public static function checkBrowserOmniWeb() |
|
| 514 | { |
|
| 515 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 516 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 517 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 518 | self::$browser->setVersion($aversion[0]); |
|
| 519 | self::$browser->setName(Browser::OMNIWEB); |
|
| 520 | ||
| 521 | return true; |
|
| 522 | } |
|
| 523 | ||
| 524 | return false; |
|
| 525 | } |
|
| 526 | ||
| 527 | /** |
|
| 528 | * Determine if the browser is Phoenix. |
|
| @@ 719-733 (lines=15) @@ | ||
| 716 | * |
|
| 717 | * @return bool |
|
| 718 | */ |
|
| 719 | public static function checkBrowserIceweasel() |
|
| 720 | { |
|
| 721 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 722 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 723 | if (isset($aresult[1])) { |
|
| 724 | $aversion = explode(' ', $aresult[1]); |
|
| 725 | self::$browser->setVersion($aversion[0]); |
|
| 726 | } |
|
| 727 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 728 | ||
| 729 | return true; |
|
| 730 | } |
|
| 731 | ||
| 732 | return false; |
|
| 733 | } |
|
| 734 | ||
| 735 | /** |
|
| 736 | * Determine if the browser is Mozilla. |
|
| @@ 778-790 (lines=13) @@ | ||
| 775 | * |
|
| 776 | * @return bool |
|
| 777 | */ |
|
| 778 | public static function checkBrowserLynx() |
|
| 779 | { |
|
| 780 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 781 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 782 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 783 | self::$browser->setVersion($aversion[0]); |
|
| 784 | self::$browser->setName(Browser::LYNX); |
|
| 785 | ||
| 786 | return true; |
|
| 787 | } |
|
| 788 | ||
| 789 | return false; |
|
| 790 | } |
|
| 791 | ||
| 792 | /** |
|
| 793 | * Determine if the browser is Amaya. |
|
| @@ 797-811 (lines=15) @@ | ||
| 794 | * |
|
| 795 | * @return bool |
|
| 796 | */ |
|
| 797 | public static function checkBrowserAmaya() |
|
| 798 | { |
|
| 799 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 800 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 801 | if (isset($aresult[1])) { |
|
| 802 | $aversion = explode(' ', $aresult[1]); |
|
| 803 | self::$browser->setVersion($aversion[0]); |
|
| 804 | } |
|
| 805 | self::$browser->setName(Browser::AMAYA); |
|
| 806 | ||
| 807 | return true; |
|
| 808 | } |
|
| 809 | ||
| 810 | return false; |
|
| 811 | } |
|
| 812 | ||
| 813 | /** |
|
| 814 | * Determine if the browser is Safari. |
|
| @@ 818-834 (lines=17) @@ | ||
| 815 | * |
|
| 816 | * @return bool |
|
| 817 | */ |
|
| 818 | public static function checkBrowserSafari() |
|
| 819 | { |
|
| 820 | if (stripos(self::$userAgentString, 'Safari') !== false) { |
|
| 821 | $aresult = explode('/', stristr(self::$userAgentString, 'Version')); |
|
| 822 | if (isset($aresult[1])) { |
|
| 823 | $aversion = explode(' ', $aresult[1]); |
|
| 824 | self::$browser->setVersion($aversion[0]); |
|
| 825 | } else { |
|
| 826 | self::$browser->setVersion(Browser::VERSION_UNKNOWN); |
|
| 827 | } |
|
| 828 | self::$browser->setName(Browser::SAFARI); |
|
| 829 | ||
| 830 | return true; |
|
| 831 | } |
|
| 832 | ||
| 833 | return false; |
|
| 834 | } |
|
| 835 | ||
| 836 | /** |
|
| 837 | * Determine if the browser is Yandex. |
|
| @@ 841-855 (lines=15) @@ | ||
| 838 | * |
|
| 839 | * @return bool |
|
| 840 | */ |
|
| 841 | public static function checkBrowserYandex() |
|
| 842 | { |
|
| 843 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 844 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 845 | if (isset($aresult[1])) { |
|
| 846 | $aversion = explode(' ', $aresult[1]); |
|
| 847 | self::$browser->setVersion($aversion[0]); |
|
| 848 | } |
|
| 849 | self::$browser->setName(Browser::YANDEX); |
|
| 850 | ||
| 851 | return true; |
|
| 852 | } |
|
| 853 | ||
| 854 | return false; |
|
| 855 | } |
|
| 856 | ||
| 857 | /** |
|
| 858 | * Determine if the browser is Android. |
|