@@ 141-155 (lines=15) @@ | ||
138 | * |
|
139 | * @return bool |
|
140 | */ |
|
141 | public static function checkBrowserBlackBerry() |
|
142 | { |
|
143 | if (stripos(self::$userAgentString, 'blackberry') !== false) { |
|
144 | $aresult = explode('/', stristr(self::$userAgentString, 'BlackBerry')); |
|
145 | if (isset($aresult[1])) { |
|
146 | $aversion = explode(' ', $aresult[1]); |
|
147 | self::$browser->setVersion($aversion[0]); |
|
148 | } |
|
149 | self::$browser->setName(Browser::BLACKBERRY); |
|
150 | ||
151 | return true; |
|
152 | } |
|
153 | ||
154 | return false; |
|
155 | } |
|
156 | ||
157 | /** |
|
158 | * Determine if the browser is a robot. |
|
@@ 395-409 (lines=15) @@ | ||
392 | * |
|
393 | * @return bool |
|
394 | */ |
|
395 | public static function checkBrowserVivaldi() |
|
396 | { |
|
397 | if (stripos(self::$userAgentString, 'Vivaldi') !== false) { |
|
398 | $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi')); |
|
399 | if (isset($aresult[1])) { |
|
400 | $aversion = explode(' ', $aresult[1]); |
|
401 | self::$browser->setVersion($aversion[0]); |
|
402 | } |
|
403 | self::$browser->setName(Browser::VIVALDI); |
|
404 | ||
405 | return true; |
|
406 | } |
|
407 | ||
408 | return false; |
|
409 | } |
|
410 | ||
411 | /** |
|
412 | * Determine if the browser is Microsoft Edge. |
|
@@ 436-450 (lines=15) @@ | ||
433 | * |
|
434 | * @return bool |
|
435 | */ |
|
436 | public static function checkBrowserGsa() |
|
437 | { |
|
438 | if (stripos(self::$userAgentString, 'GSA') !== false) { |
|
439 | $aresult = explode('/', stristr(self::$userAgentString, 'GSA')); |
|
440 | if (isset($aresult[1])) { |
|
441 | $aversion = explode(' ', $aresult[1]); |
|
442 | self::$browser->setVersion($aversion[0]); |
|
443 | } |
|
444 | self::$browser->setName(Browser::GSA); |
|
445 | ||
446 | return true; |
|
447 | } |
|
448 | ||
449 | return false; |
|
450 | } |
|
451 | ||
452 | /** |
|
453 | * Determine if the browser is WebTv. |
|
@@ 457-471 (lines=15) @@ | ||
454 | * |
|
455 | * @return bool |
|
456 | */ |
|
457 | public static function checkBrowserWebTv() |
|
458 | { |
|
459 | if (stripos(self::$userAgentString, 'webtv') !== false) { |
|
460 | $aresult = explode('/', stristr(self::$userAgentString, 'webtv')); |
|
461 | if (isset($aresult[1])) { |
|
462 | $aversion = explode(' ', $aresult[1]); |
|
463 | self::$browser->setVersion($aversion[0]); |
|
464 | } |
|
465 | self::$browser->setName(Browser::WEBTV); |
|
466 | ||
467 | return true; |
|
468 | } |
|
469 | ||
470 | return false; |
|
471 | } |
|
472 | ||
473 | /** |
|
474 | * Determine if the browser is NetPositive. |
|
@@ 499-513 (lines=15) @@ | ||
496 | * |
|
497 | * @return bool |
|
498 | */ |
|
499 | public static function checkBrowserGaleon() |
|
500 | { |
|
501 | if (stripos(self::$userAgentString, 'galeon') !== false) { |
|
502 | $aresult = explode(' ', stristr(self::$userAgentString, 'galeon')); |
|
503 | $aversion = explode('/', $aresult[0]); |
|
504 | if (isset($aversion[1])) { |
|
505 | self::$browser->setVersion($aversion[1]); |
|
506 | } |
|
507 | self::$browser->setName(Browser::GALEON); |
|
508 | ||
509 | return true; |
|
510 | } |
|
511 | ||
512 | return false; |
|
513 | } |
|
514 | ||
515 | /** |
|
516 | * Determine if the browser is Konqueror. |
|
@@ 520-534 (lines=15) @@ | ||
517 | * |
|
518 | * @return bool |
|
519 | */ |
|
520 | public static function checkBrowserKonqueror() |
|
521 | { |
|
522 | if (stripos(self::$userAgentString, 'Konqueror') !== false) { |
|
523 | $aresult = explode(' ', stristr(self::$userAgentString, 'Konqueror')); |
|
524 | $aversion = explode('/', $aresult[0]); |
|
525 | if (isset($aversion[1])) { |
|
526 | self::$browser->setVersion($aversion[1]); |
|
527 | } |
|
528 | self::$browser->setName(Browser::KONQUEROR); |
|
529 | ||
530 | return true; |
|
531 | } |
|
532 | ||
533 | return false; |
|
534 | } |
|
535 | ||
536 | /** |
|
537 | * Determine if the browser is iCab. |
|
@@ 541-554 (lines=14) @@ | ||
538 | * |
|
539 | * @return bool |
|
540 | */ |
|
541 | public static function checkBrowserIcab() |
|
542 | { |
|
543 | if (stripos(self::$userAgentString, 'icab') !== false) { |
|
544 | $aversion = explode(' ', stristr(str_replace('/', ' ', self::$userAgentString), 'icab')); |
|
545 | if (isset($aversion[1])) { |
|
546 | self::$browser->setVersion($aversion[1]); |
|
547 | } |
|
548 | self::$browser->setName(Browser::ICAB); |
|
549 | ||
550 | return true; |
|
551 | } |
|
552 | ||
553 | return false; |
|
554 | } |
|
555 | ||
556 | /** |
|
557 | * Determine if the browser is OmniWeb. |
|
@@ 561-573 (lines=13) @@ | ||
558 | * |
|
559 | * @return bool |
|
560 | */ |
|
561 | public static function checkBrowserOmniWeb() |
|
562 | { |
|
563 | if (stripos(self::$userAgentString, 'omniweb') !== false) { |
|
564 | $aresult = explode('/', stristr(self::$userAgentString, 'omniweb')); |
|
565 | $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : ''); |
|
566 | self::$browser->setVersion($aversion[0]); |
|
567 | self::$browser->setName(Browser::OMNIWEB); |
|
568 | ||
569 | return true; |
|
570 | } |
|
571 | ||
572 | return false; |
|
573 | } |
|
574 | ||
575 | /** |
|
576 | * Determine if the browser is Phoenix. |
|
@@ 767-781 (lines=15) @@ | ||
764 | * |
|
765 | * @return bool |
|
766 | */ |
|
767 | public static function checkBrowserIceweasel() |
|
768 | { |
|
769 | if (stripos(self::$userAgentString, 'Iceweasel') !== false) { |
|
770 | $aresult = explode('/', stristr(self::$userAgentString, 'Iceweasel')); |
|
771 | if (isset($aresult[1])) { |
|
772 | $aversion = explode(' ', $aresult[1]); |
|
773 | self::$browser->setVersion($aversion[0]); |
|
774 | } |
|
775 | self::$browser->setName(Browser::ICEWEASEL); |
|
776 | ||
777 | return true; |
|
778 | } |
|
779 | ||
780 | return false; |
|
781 | } |
|
782 | ||
783 | /** |
|
784 | * Determine if the browser is Mozilla. |
|
@@ 829-841 (lines=13) @@ | ||
826 | * |
|
827 | * @return bool |
|
828 | */ |
|
829 | public static function checkBrowserLynx() |
|
830 | { |
|
831 | if (stripos(self::$userAgentString, 'lynx') !== false) { |
|
832 | $aresult = explode('/', stristr(self::$userAgentString, 'Lynx')); |
|
833 | $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : '')); |
|
834 | self::$browser->setVersion($aversion[0]); |
|
835 | self::$browser->setName(Browser::LYNX); |
|
836 | ||
837 | return true; |
|
838 | } |
|
839 | ||
840 | return false; |
|
841 | } |
|
842 | ||
843 | /** |
|
844 | * Determine if the browser is Amaya. |
|
@@ 848-862 (lines=15) @@ | ||
845 | * |
|
846 | * @return bool |
|
847 | */ |
|
848 | public static function checkBrowserAmaya() |
|
849 | { |
|
850 | if (stripos(self::$userAgentString, 'amaya') !== false) { |
|
851 | $aresult = explode('/', stristr(self::$userAgentString, 'Amaya')); |
|
852 | if (isset($aresult[1])) { |
|
853 | $aversion = explode(' ', $aresult[1]); |
|
854 | self::$browser->setVersion($aversion[0]); |
|
855 | } |
|
856 | self::$browser->setName(Browser::AMAYA); |
|
857 | ||
858 | return true; |
|
859 | } |
|
860 | ||
861 | return false; |
|
862 | } |
|
863 | ||
864 | /** |
|
865 | * Determine if the browser is Safari. |
|
@@ 892-906 (lines=15) @@ | ||
889 | * |
|
890 | * @return bool |
|
891 | */ |
|
892 | public static function checkBrowserYandex() |
|
893 | { |
|
894 | if (stripos(self::$userAgentString, 'YaBrowser') !== false) { |
|
895 | $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser')); |
|
896 | if (isset($aresult[1])) { |
|
897 | $aversion = explode(' ', $aresult[1]); |
|
898 | self::$browser->setVersion($aversion[0]); |
|
899 | } |
|
900 | self::$browser->setName(Browser::YANDEX); |
|
901 | ||
902 | return true; |
|
903 | } |
|
904 | ||
905 | return false; |
|
906 | } |
|
907 | ||
908 | /** |
|
909 | * Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo. |
|
@@ 913-927 (lines=15) @@ | ||
910 | * |
|
911 | * @return bool |
|
912 | */ |
|
913 | public static function checkBrowserDragon() |
|
914 | { |
|
915 | if (stripos(self::$userAgentString, 'Dragon') !== false) { |
|
916 | $aresult = explode('/', stristr(self::$userAgentString, 'Dragon')); |
|
917 | if (isset($aresult[1])) { |
|
918 | $aversion = explode(' ', $aresult[1]); |
|
919 | self::$browser->setVersion($aversion[0]); |
|
920 | } |
|
921 | self::$browser->setName(Browser::DRAGON); |
|
922 | ||
923 | return true; |
|
924 | } |
|
925 | ||
926 | return false; |
|
927 | } |
|
928 | ||
929 | /** |
|
930 | * Determine if the browser is Android. |