public function getDeviceType()
    {
        $device = $this->session->get('device');

        if (empty($device)) {

            $detector = $this->getLibrary();

            if ($detector->isMobile()) {
                $device = 'mobile';
            } else if ($detector->isTablet()) {
                $device = 'tablet';
            } else {
                $device = 'desktop';
            }

            $this->session->set('device', $device);
        }

        return $device;
    }
public function getDeviceType()
    {
        $device = $this->session->get('device');

        if (empty($device)) {

            $detector = $this->getLibrary();

            if ($detector->isMobile()) {
                $device = 'mobile';
            } else if ($detector->isTablet()) {
                $device = 'tablet';
            } else {
                $device = 'desktop';
            }

            $this->session->set('device', $device);
        }

        return $device;
    }
public function getDeviceType ( ) { $ device = $ this -> session -> get ( 'device' ) ; if ( empty ( $ device ) ) { $ detector = $ this -> getLibrary ( ) ; if ( $ detector -> isMobile ( ) ) { $ device = 'mobile' ; } else if ( $ detector -> isTablet ( ) ) { $ device = 'tablet' ; } else { $ device = 'desktop' ; } $ this -> session -> set ( 'device' , $ device ) ; } return $ device ; }
Returns a device type
@return string
Returns a device type