Browser::isTablet PHP Method

isTablet() public method

Is the browser from a tablet device?
public isTablet ( ) : boolean
return boolean True if the browser is from a tablet device otherwise false
    public function isTablet()
    {
        return $this->_is_tablet;
    }

Usage Example

 /**
  * Public class constructor
  * @access public
  * @throws Exception when user has already been registered
  */
 public function __construct()
 {
     if (isset($_SESSION['visitor']) && $_SESSION['visitor'] == "accessed") {
         throw new Exception("User already registered", 1);
     } else {
         $this->dateTime = Carbon::now();
         $this->browser = BrowserDetect::browserFamily();
         $this->OS = BrowserDetect::osName();
         if (BrowserDetect::isMobile()) {
             $this->deviceType = "mobile";
         } elseif (Browser::isTablet()) {
             $this->deviceType = "tablet";
         } elseif (Browser::isDesktop()) {
             $this->deviceType = "desktop";
         } elseif (Browser::isBot()) {
             $this->deviceType = "bot";
         } else {
             $this->deviceType = "unknown";
         }
         $this->deviceFamily = Broswer::deviceFamily();
         $this->deviceModel = Browser::deviceModel();
         $this->broadcastAddress = $_SERVER["REMOTE_ADDR"];
         $this->model = new AccessModel($this);
     }
 }
All Usage Examples Of Browser::isTablet