| @@ 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. |
|
| @@ 349-363 (lines=15) @@ | ||
| 346 | * |
|
| 347 | * @return bool |
|
| 348 | */ |
|
| 349 | public static function checkBrowserVivaldi() |
|
| 350 | { |
|
| 351 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 352 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 353 | if (isset($aresult[1])) { |
|
| 354 | $aversion = explode(' ', $aresult[1]); |
|
| 355 | self::$browser->setVersion($aversion[0]); |
|
| 356 | } |
|
| 357 | self::$browser->setName(Browser::VIVALDI); |
|
| 358 | ||
| 359 | return true; |
|
| 360 | } |
|
| 361 | ||
| 362 | return false; |
|
| 363 | } |
|
| 364 | ||
| 365 | /** |
|
| 366 | * Determine if the browser is Microsoft Edge. |
|
| @@ 390-404 (lines=15) @@ | ||
| 387 | * |
|
| 388 | * @return bool |
|
| 389 | */ |
|
| 390 | public static function checkBrowserGsa() |
|
| 391 | { |
|
| 392 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 393 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 394 | if (isset($aresult[1])) { |
|
| 395 | $aversion = explode(' ', $aresult[1]); |
|
| 396 | self::$browser->setVersion($aversion[0]); |
|
| 397 | } |
|
| 398 | self::$browser->setName(Browser::GSA); |
|
| 399 | ||
| 400 | return true; |
|
| 401 | } |
|
| 402 | ||
| 403 | return false; |
|
| 404 | } |
|
| 405 | ||
| 406 | /** |
|
| 407 | * Determine if the browser is WebTv. |
|
| @@ 411-425 (lines=15) @@ | ||
| 408 | * |
|
| 409 | * @return bool |
|
| 410 | */ |
|
| 411 | public static function checkBrowserWebTv() |
|
| 412 | { |
|
| 413 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 414 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 415 | if (isset($aresult[1])) { |
|
| 416 | $aversion = explode(' ', $aresult[1]); |
|
| 417 | self::$browser->setVersion($aversion[0]); |
|
| 418 | } |
|
| 419 | self::$browser->setName(Browser::WEBTV); |
|
| 420 | ||
| 421 | return true; |
|
| 422 | } |
|
| 423 | ||
| 424 | return false; |
|
| 425 | } |
|
| 426 | ||
| 427 | /** |
|
| 428 | * Determine if the browser is NetPositive. |
|
| @@ 453-467 (lines=15) @@ | ||
| 450 | * |
|
| 451 | * @return bool |
|
| 452 | */ |
|
| 453 | public static function checkBrowserGaleon() |
|
| 454 | { |
|
| 455 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 456 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 457 | $aversion = explode('/', $aresult[0]); |
|
| 458 | if (isset($aversion[1])) { |
|
| 459 | self::$browser->setVersion($aversion[1]); |
|
| 460 | } |
|
| 461 | self::$browser->setName(Browser::GALEON); |
|
| 462 | ||
| 463 | return true; |
|
| 464 | } |
|
| 465 | ||
| 466 | return false; |
|
| 467 | } |
|
| 468 | ||
| 469 | /** |
|
| 470 | * Determine if the browser is Konqueror. |
|
| @@ 474-488 (lines=15) @@ | ||
| 471 | * |
|
| 472 | * @return bool |
|
| 473 | */ |
|
| 474 | public static function checkBrowserKonqueror() |
|
| 475 | { |
|
| 476 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 477 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 478 | $aversion = explode('/', $aresult[0]); |
|
| 479 | if (isset($aversion[1])) { |
|
| 480 | self::$browser->setVersion($aversion[1]); |
|
| 481 | } |
|
| 482 | self::$browser->setName(Browser::KONQUEROR); |
|
| 483 | ||
| 484 | return true; |
|
| 485 | } |
|
| 486 | ||
| 487 | return false; |
|
| 488 | } |
|
| 489 | ||
| 490 | /** |
|
| 491 | * Determine if the browser is iCab. |
|
| @@ 495-508 (lines=14) @@ | ||
| 492 | * |
|
| 493 | * @return bool |
|
| 494 | */ |
|
| 495 | public static function checkBrowserIcab() |
|
| 496 | { |
|
| 497 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 498 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 499 | if (isset($aversion[1])) { |
|
| 500 | self::$browser->setVersion($aversion[1]); |
|
| 501 | } |
|
| 502 | self::$browser->setName(Browser::ICAB); |
|
| 503 | ||
| 504 | return true; |
|
| 505 | } |
|
| 506 | ||
| 507 | return false; |
|
| 508 | } |
|
| 509 | ||
| 510 | /** |
|
| 511 | * Determine if the browser is OmniWeb. |
|
| @@ 515-527 (lines=13) @@ | ||
| 512 | * |
|
| 513 | * @return bool |
|
| 514 | */ |
|
| 515 | public static function checkBrowserOmniWeb() |
|
| 516 | { |
|
| 517 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 518 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 519 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 520 | self::$browser->setVersion($aversion[0]); |
|
| 521 | self::$browser->setName(Browser::OMNIWEB); |
|
| 522 | ||
| 523 | return true; |
|
| 524 | } |
|
| 525 | ||
| 526 | return false; |
|
| 527 | } |
|
| 528 | ||
| 529 | /** |
|
| 530 | * Determine if the browser is Phoenix. |
|
| @@ 721-735 (lines=15) @@ | ||
| 718 | * |
|
| 719 | * @return bool |
|
| 720 | */ |
|
| 721 | public static function checkBrowserIceweasel() |
|
| 722 | { |
|
| 723 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 724 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 725 | if (isset($aresult[1])) { |
|
| 726 | $aversion = explode(' ', $aresult[1]); |
|
| 727 | self::$browser->setVersion($aversion[0]); |
|
| 728 | } |
|
| 729 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 730 | ||
| 731 | return true; |
|
| 732 | } |
|
| 733 | ||
| 734 | return false; |
|
| 735 | } |
|
| 736 | ||
| 737 | /** |
|
| 738 | * Determine if the browser is Mozilla. |
|
| @@ 783-795 (lines=13) @@ | ||
| 780 | * |
|
| 781 | * @return bool |
|
| 782 | */ |
|
| 783 | public static function checkBrowserLynx() |
|
| 784 | { |
|
| 785 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 786 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 787 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 788 | self::$browser->setVersion($aversion[0]); |
|
| 789 | self::$browser->setName(Browser::LYNX); |
|
| 790 | ||
| 791 | return true; |
|
| 792 | } |
|
| 793 | ||
| 794 | return false; |
|
| 795 | } |
|
| 796 | ||
| 797 | /** |
|
| 798 | * Determine if the browser is Amaya. |
|
| @@ 802-816 (lines=15) @@ | ||
| 799 | * |
|
| 800 | * @return bool |
|
| 801 | */ |
|
| 802 | public static function checkBrowserAmaya() |
|
| 803 | { |
|
| 804 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 805 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 806 | if (isset($aresult[1])) { |
|
| 807 | $aversion = explode(' ', $aresult[1]); |
|
| 808 | self::$browser->setVersion($aversion[0]); |
|
| 809 | } |
|
| 810 | self::$browser->setName(Browser::AMAYA); |
|
| 811 | ||
| 812 | return true; |
|
| 813 | } |
|
| 814 | ||
| 815 | return false; |
|
| 816 | } |
|
| 817 | ||
| 818 | /** |
|
| 819 | * Determine if the browser is Safari. |
|
| @@ 846-860 (lines=15) @@ | ||
| 843 | * |
|
| 844 | * @return bool |
|
| 845 | */ |
|
| 846 | public static function checkBrowserYandex() |
|
| 847 | { |
|
| 848 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 849 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 850 | if (isset($aresult[1])) { |
|
| 851 | $aversion = explode(' ', $aresult[1]); |
|
| 852 | self::$browser->setVersion($aversion[0]); |
|
| 853 | } |
|
| 854 | self::$browser->setName(Browser::YANDEX); |
|
| 855 | ||
| 856 | return true; |
|
| 857 | } |
|
| 858 | ||
| 859 | return false; |
|
| 860 | } |
|
| 861 | ||
| 862 | /** |
|
| 863 | * Determine if the browser is Android. |
|