| @@ 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. |
|
| @@ 377-391 (lines=15) @@ | ||
| 374 | * |
|
| 375 | * @return bool |
|
| 376 | */ |
|
| 377 | public static function checkBrowserVivaldi() |
|
| 378 | { |
|
| 379 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 380 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 381 | if (isset($aresult[1])) { |
|
| 382 | $aversion = explode(' ', $aresult[1]); |
|
| 383 | self::$browser->setVersion($aversion[0]); |
|
| 384 | } |
|
| 385 | self::$browser->setName(Browser::VIVALDI); |
|
| 386 | ||
| 387 | return true; |
|
| 388 | } |
|
| 389 | ||
| 390 | return false; |
|
| 391 | } |
|
| 392 | ||
| 393 | /** |
|
| 394 | * Determine if the browser is Microsoft Edge. |
|
| @@ 418-432 (lines=15) @@ | ||
| 415 | * |
|
| 416 | * @return bool |
|
| 417 | */ |
|
| 418 | public static function checkBrowserGsa() |
|
| 419 | { |
|
| 420 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 421 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 422 | if (isset($aresult[1])) { |
|
| 423 | $aversion = explode(' ', $aresult[1]); |
|
| 424 | self::$browser->setVersion($aversion[0]); |
|
| 425 | } |
|
| 426 | self::$browser->setName(Browser::GSA); |
|
| 427 | ||
| 428 | return true; |
|
| 429 | } |
|
| 430 | ||
| 431 | return false; |
|
| 432 | } |
|
| 433 | ||
| 434 | /** |
|
| 435 | * Determine if the browser is WebTv. |
|
| @@ 439-453 (lines=15) @@ | ||
| 436 | * |
|
| 437 | * @return bool |
|
| 438 | */ |
|
| 439 | public static function checkBrowserWebTv() |
|
| 440 | { |
|
| 441 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 442 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 443 | if (isset($aresult[1])) { |
|
| 444 | $aversion = explode(' ', $aresult[1]); |
|
| 445 | self::$browser->setVersion($aversion[0]); |
|
| 446 | } |
|
| 447 | self::$browser->setName(Browser::WEBTV); |
|
| 448 | ||
| 449 | return true; |
|
| 450 | } |
|
| 451 | ||
| 452 | return false; |
|
| 453 | } |
|
| 454 | ||
| 455 | /** |
|
| 456 | * Determine if the browser is NetPositive. |
|
| @@ 481-495 (lines=15) @@ | ||
| 478 | * |
|
| 479 | * @return bool |
|
| 480 | */ |
|
| 481 | public static function checkBrowserGaleon() |
|
| 482 | { |
|
| 483 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 484 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 485 | $aversion = explode('/', $aresult[0]); |
|
| 486 | if (isset($aversion[1])) { |
|
| 487 | self::$browser->setVersion($aversion[1]); |
|
| 488 | } |
|
| 489 | self::$browser->setName(Browser::GALEON); |
|
| 490 | ||
| 491 | return true; |
|
| 492 | } |
|
| 493 | ||
| 494 | return false; |
|
| 495 | } |
|
| 496 | ||
| 497 | /** |
|
| 498 | * Determine if the browser is Konqueror. |
|
| @@ 502-516 (lines=15) @@ | ||
| 499 | * |
|
| 500 | * @return bool |
|
| 501 | */ |
|
| 502 | public static function checkBrowserKonqueror() |
|
| 503 | { |
|
| 504 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 505 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 506 | $aversion = explode('/', $aresult[0]); |
|
| 507 | if (isset($aversion[1])) { |
|
| 508 | self::$browser->setVersion($aversion[1]); |
|
| 509 | } |
|
| 510 | self::$browser->setName(Browser::KONQUEROR); |
|
| 511 | ||
| 512 | return true; |
|
| 513 | } |
|
| 514 | ||
| 515 | return false; |
|
| 516 | } |
|
| 517 | ||
| 518 | /** |
|
| 519 | * Determine if the browser is iCab. |
|
| @@ 523-536 (lines=14) @@ | ||
| 520 | * |
|
| 521 | * @return bool |
|
| 522 | */ |
|
| 523 | public static function checkBrowserIcab() |
|
| 524 | { |
|
| 525 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 526 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 527 | if (isset($aversion[1])) { |
|
| 528 | self::$browser->setVersion($aversion[1]); |
|
| 529 | } |
|
| 530 | self::$browser->setName(Browser::ICAB); |
|
| 531 | ||
| 532 | return true; |
|
| 533 | } |
|
| 534 | ||
| 535 | return false; |
|
| 536 | } |
|
| 537 | ||
| 538 | /** |
|
| 539 | * Determine if the browser is OmniWeb. |
|
| @@ 543-555 (lines=13) @@ | ||
| 540 | * |
|
| 541 | * @return bool |
|
| 542 | */ |
|
| 543 | public static function checkBrowserOmniWeb() |
|
| 544 | { |
|
| 545 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 546 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 547 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 548 | self::$browser->setVersion($aversion[0]); |
|
| 549 | self::$browser->setName(Browser::OMNIWEB); |
|
| 550 | ||
| 551 | return true; |
|
| 552 | } |
|
| 553 | ||
| 554 | return false; |
|
| 555 | } |
|
| 556 | ||
| 557 | /** |
|
| 558 | * Determine if the browser is Phoenix. |
|
| @@ 749-763 (lines=15) @@ | ||
| 746 | * |
|
| 747 | * @return bool |
|
| 748 | */ |
|
| 749 | public static function checkBrowserIceweasel() |
|
| 750 | { |
|
| 751 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 752 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 753 | if (isset($aresult[1])) { |
|
| 754 | $aversion = explode(' ', $aresult[1]); |
|
| 755 | self::$browser->setVersion($aversion[0]); |
|
| 756 | } |
|
| 757 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 758 | ||
| 759 | return true; |
|
| 760 | } |
|
| 761 | ||
| 762 | return false; |
|
| 763 | } |
|
| 764 | ||
| 765 | /** |
|
| 766 | * Determine if the browser is Mozilla. |
|
| @@ 811-823 (lines=13) @@ | ||
| 808 | * |
|
| 809 | * @return bool |
|
| 810 | */ |
|
| 811 | public static function checkBrowserLynx() |
|
| 812 | { |
|
| 813 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 814 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 815 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 816 | self::$browser->setVersion($aversion[0]); |
|
| 817 | self::$browser->setName(Browser::LYNX); |
|
| 818 | ||
| 819 | return true; |
|
| 820 | } |
|
| 821 | ||
| 822 | return false; |
|
| 823 | } |
|
| 824 | ||
| 825 | /** |
|
| 826 | * Determine if the browser is Amaya. |
|
| @@ 830-844 (lines=15) @@ | ||
| 827 | * |
|
| 828 | * @return bool |
|
| 829 | */ |
|
| 830 | public static function checkBrowserAmaya() |
|
| 831 | { |
|
| 832 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 833 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 834 | if (isset($aresult[1])) { |
|
| 835 | $aversion = explode(' ', $aresult[1]); |
|
| 836 | self::$browser->setVersion($aversion[0]); |
|
| 837 | } |
|
| 838 | self::$browser->setName(Browser::AMAYA); |
|
| 839 | ||
| 840 | return true; |
|
| 841 | } |
|
| 842 | ||
| 843 | return false; |
|
| 844 | } |
|
| 845 | ||
| 846 | /** |
|
| 847 | * Determine if the browser is Safari. |
|
| @@ 874-888 (lines=15) @@ | ||
| 871 | * |
|
| 872 | * @return bool |
|
| 873 | */ |
|
| 874 | public static function checkBrowserYandex() |
|
| 875 | { |
|
| 876 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 877 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 878 | if (isset($aresult[1])) { |
|
| 879 | $aversion = explode(' ', $aresult[1]); |
|
| 880 | self::$browser->setVersion($aversion[0]); |
|
| 881 | } |
|
| 882 | self::$browser->setName(Browser::YANDEX); |
|
| 883 | ||
| 884 | return true; |
|
| 885 | } |
|
| 886 | ||
| 887 | return false; |
|
| 888 | } |
|
| 889 | ||
| 890 | /** |
|
| 891 | * Determine if the browser is Android. |
|