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