| @@ 384-398 (lines=15) @@ | ||
| 381 | * |
|
| 382 | * @return bool |
|
| 383 | */ |
|
| 384 | public static function checkBrowserSamsung() |
|
| 385 | { |
|
| 386 | if (stripos(self::$userAgentString, 'SamsungBrowser') !== false) { |
|
| 387 | $aresult = explode('/', stristr(self::$userAgentString, 'SamsungBrowser')); |
|
| 388 | if (isset($aresult[1])) { |
|
| 389 | $aversion = explode(' ', $aresult[1]); |
|
| 390 | self::$browser->setVersion($aversion[0]); |
|
| 391 | } |
|
| 392 | self::$browser->setName(Browser::SAMSUNG_BROWSER); |
|
| 393 | ||
| 394 | return true; |
|
| 395 | } |
|
| 396 | ||
| 397 | return false; |
|
| 398 | } |
|
| 399 | ||
| 400 | /** |
|
| 401 | * Determine if the browser is Chrome. |
|
| @@ 435-449 (lines=15) @@ | ||
| 432 | * |
|
| 433 | * @return bool |
|
| 434 | */ |
|
| 435 | public static function checkBrowserVivaldi() |
|
| 436 | { |
|
| 437 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
| 438 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
| 439 | if (isset($aresult[1])) { |
|
| 440 | $aversion = explode(' ', $aresult[1]); |
|
| 441 | self::$browser->setVersion($aversion[0]); |
|
| 442 | } |
|
| 443 | self::$browser->setName(Browser::VIVALDI); |
|
| 444 | ||
| 445 | return true; |
|
| 446 | } |
|
| 447 | ||
| 448 | return false; |
|
| 449 | } |
|
| 450 | ||
| 451 | /** |
|
| 452 | * Determine if the browser is Microsoft Edge. |
|
| @@ 476-490 (lines=15) @@ | ||
| 473 | * |
|
| 474 | * @return bool |
|
| 475 | */ |
|
| 476 | public static function checkBrowserGsa() |
|
| 477 | { |
|
| 478 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
| 479 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
| 480 | if (isset($aresult[1])) { |
|
| 481 | $aversion = explode(' ', $aresult[1]); |
|
| 482 | self::$browser->setVersion($aversion[0]); |
|
| 483 | } |
|
| 484 | self::$browser->setName(Browser::GSA); |
|
| 485 | ||
| 486 | return true; |
|
| 487 | } |
|
| 488 | ||
| 489 | return false; |
|
| 490 | } |
|
| 491 | ||
| 492 | /** |
|
| 493 | * Determine if the browser is WebTv. |
|
| @@ 497-511 (lines=15) @@ | ||
| 494 | * |
|
| 495 | * @return bool |
|
| 496 | */ |
|
| 497 | public static function checkBrowserWebTv() |
|
| 498 | { |
|
| 499 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
| 500 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
| 501 | if (isset($aresult[1])) { |
|
| 502 | $aversion = explode(' ', $aresult[1]); |
|
| 503 | self::$browser->setVersion($aversion[0]); |
|
| 504 | } |
|
| 505 | self::$browser->setName(Browser::WEBTV); |
|
| 506 | ||
| 507 | return true; |
|
| 508 | } |
|
| 509 | ||
| 510 | return false; |
|
| 511 | } |
|
| 512 | ||
| 513 | /** |
|
| 514 | * Determine if the browser is NetPositive. |
|
| @@ 539-553 (lines=15) @@ | ||
| 536 | * |
|
| 537 | * @return bool |
|
| 538 | */ |
|
| 539 | public static function checkBrowserGaleon() |
|
| 540 | { |
|
| 541 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
| 542 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
| 543 | $aversion = explode('/', $aresult[0]); |
|
| 544 | if (isset($aversion[1])) { |
|
| 545 | self::$browser->setVersion($aversion[1]); |
|
| 546 | } |
|
| 547 | self::$browser->setName(Browser::GALEON); |
|
| 548 | ||
| 549 | return true; |
|
| 550 | } |
|
| 551 | ||
| 552 | return false; |
|
| 553 | } |
|
| 554 | ||
| 555 | /** |
|
| 556 | * Determine if the browser is Konqueror. |
|
| @@ 560-574 (lines=15) @@ | ||
| 557 | * |
|
| 558 | * @return bool |
|
| 559 | */ |
|
| 560 | public static function checkBrowserKonqueror() |
|
| 561 | { |
|
| 562 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
| 563 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
| 564 | $aversion = explode('/', $aresult[0]); |
|
| 565 | if (isset($aversion[1])) { |
|
| 566 | self::$browser->setVersion($aversion[1]); |
|
| 567 | } |
|
| 568 | self::$browser->setName(Browser::KONQUEROR); |
|
| 569 | ||
| 570 | return true; |
|
| 571 | } |
|
| 572 | ||
| 573 | return false; |
|
| 574 | } |
|
| 575 | ||
| 576 | /** |
|
| 577 | * Determine if the browser is iCab. |
|
| @@ 581-594 (lines=14) @@ | ||
| 578 | * |
|
| 579 | * @return bool |
|
| 580 | */ |
|
| 581 | public static function checkBrowserIcab() |
|
| 582 | { |
|
| 583 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
| 584 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
| 585 | if (isset($aversion[1])) { |
|
| 586 | self::$browser->setVersion($aversion[1]); |
|
| 587 | } |
|
| 588 | self::$browser->setName(Browser::ICAB); |
|
| 589 | ||
| 590 | return true; |
|
| 591 | } |
|
| 592 | ||
| 593 | return false; |
|
| 594 | } |
|
| 595 | ||
| 596 | /** |
|
| 597 | * Determine if the browser is OmniWeb. |
|
| @@ 601-613 (lines=13) @@ | ||
| 598 | * |
|
| 599 | * @return bool |
|
| 600 | */ |
|
| 601 | public static function checkBrowserOmniWeb() |
|
| 602 | { |
|
| 603 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
| 604 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
| 605 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
| 606 | self::$browser->setVersion($aversion[0]); |
|
| 607 | self::$browser->setName(Browser::OMNIWEB); |
|
| 608 | ||
| 609 | return true; |
|
| 610 | } |
|
| 611 | ||
| 612 | return false; |
|
| 613 | } |
|
| 614 | ||
| 615 | /** |
|
| 616 | * Determine if the browser is Phoenix. |
|
| @@ 807-821 (lines=15) @@ | ||
| 804 | * |
|
| 805 | * @return bool |
|
| 806 | */ |
|
| 807 | public static function checkBrowserIceweasel() |
|
| 808 | { |
|
| 809 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
| 810 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
| 811 | if (isset($aresult[1])) { |
|
| 812 | $aversion = explode(' ', $aresult[1]); |
|
| 813 | self::$browser->setVersion($aversion[0]); |
|
| 814 | } |
|
| 815 | self::$browser->setName(Browser::ICEWEASEL); |
|
| 816 | ||
| 817 | return true; |
|
| 818 | } |
|
| 819 | ||
| 820 | return false; |
|
| 821 | } |
|
| 822 | ||
| 823 | /** |
|
| 824 | * Determine if the browser is Mozilla. |
|
| @@ 869-881 (lines=13) @@ | ||
| 866 | * |
|
| 867 | * @return bool |
|
| 868 | */ |
|
| 869 | public static function checkBrowserLynx() |
|
| 870 | { |
|
| 871 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
| 872 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
| 873 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
| 874 | self::$browser->setVersion($aversion[0]); |
|
| 875 | self::$browser->setName(Browser::LYNX); |
|
| 876 | ||
| 877 | return true; |
|
| 878 | } |
|
| 879 | ||
| 880 | return false; |
|
| 881 | } |
|
| 882 | ||
| 883 | /** |
|
| 884 | * Determine if the browser is Amaya. |
|
| @@ 888-902 (lines=15) @@ | ||
| 885 | * |
|
| 886 | * @return bool |
|
| 887 | */ |
|
| 888 | public static function checkBrowserAmaya() |
|
| 889 | { |
|
| 890 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
| 891 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
| 892 | if (isset($aresult[1])) { |
|
| 893 | $aversion = explode(' ', $aresult[1]); |
|
| 894 | self::$browser->setVersion($aversion[0]); |
|
| 895 | } |
|
| 896 | self::$browser->setName(Browser::AMAYA); |
|
| 897 | ||
| 898 | return true; |
|
| 899 | } |
|
| 900 | ||
| 901 | return false; |
|
| 902 | } |
|
| 903 | ||
| 904 | /** |
|
| 905 | * Determine if the browser is Safari. |
|
| @@ 946-960 (lines=15) @@ | ||
| 943 | * |
|
| 944 | * @return bool |
|
| 945 | */ |
|
| 946 | public static function checkBrowserYandex() |
|
| 947 | { |
|
| 948 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
| 949 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
| 950 | if (isset($aresult[1])) { |
|
| 951 | $aversion = explode(' ', $aresult[1]); |
|
| 952 | self::$browser->setVersion($aversion[0]); |
|
| 953 | } |
|
| 954 | self::$browser->setName(Browser::YANDEX); |
|
| 955 | ||
| 956 | return true; |
|
| 957 | } |
|
| 958 | ||
| 959 | return false; |
|
| 960 | } |
|
| 961 | ||
| 962 | /** |
|
| 963 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
| @@ 967-981 (lines=15) @@ | ||
| 964 | * |
|
| 965 | * @return bool |
|
| 966 | */ |
|
| 967 | public static function checkBrowserDragon() |
|
| 968 | { |
|
| 969 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
| 970 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
| 971 | if (isset($aresult[1])) { |
|
| 972 | $aversion = explode(' ', $aresult[1]); |
|
| 973 | self::$browser->setVersion($aversion[0]); |
|
| 974 | } |
|
| 975 | self::$browser->setName(Browser::DRAGON); |
|
| 976 | ||
| 977 | return true; |
|
| 978 | } |
|
| 979 | ||
| 980 | return false; |
|
| 981 | } |
|
| 982 | ||
| 983 | /** |
|
| 984 | * Determine if the browser is Android. |
|