| 1 | <?php |
||
| 10 | class Browser |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @return boolean whether the user browser is Internet Explorer |
||
| 15 | */ |
||
| 16 | public static function isInternetExplorer() |
||
| 17 | { |
||
| 18 | $browser = new Browser\Browser(); |
||
| 19 | return $browser->getBrowser() === $browser::IE; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return boolean whether the user browser is a mobile browser (tablets |
||
| 24 | * not including) |
||
| 25 | */ |
||
| 26 | public static function isMobile() |
||
| 27 | { |
||
| 28 | $detector = new Detection\MobileDetect(); |
||
| 29 | return $detector->isMobile() && !$detector->isTablet(); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return boolean whether the user browser is a tablet browser |
||
| 34 | */ |
||
| 35 | public static function isTablet() |
||
| 39 | } |
||
| 40 | |||
| 41 | } |
||
| 42 |