Overview

Namespaces

  • Sleepy
  • Module
    • Authentication
    • CSV
    • DB
    • FormBuilder
    • FSDB
    • IP2Country
    • Mailer
    • MobiDetect
    • Navigation
    • StaticCache
  • PHP

Classes

  • Detector
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class Detector

Detects if a device is a mobile device and which kind.

Attribution: Regex taken from unknown source

Usage

$m = new \Module\MobiDetect\Detector();

  if ($m->isMobile()) {
    echo "This is a mobile device";
  }

Changelog

Version 1.6

  • Fixed bug with BCC and CC
Namespace: Module\MobiDetect
Deprecated: v.1.0
License: http://opensource.org/licenses/MIT
Author: Jaime A. Rodriguez hi.i.am.jaime@gmail.com
Version: 1.1
Date: June 16, 2014
Located at class.mobidetect.php
Methods summary
public
# __construct( )
private
# detect( )

Detects the device. Called in constructor.

Detects the device. Called in constructor.

Private

public boolean
# isMobile( )

Checks if it is a mobile device.

Checks if it is a mobile device.

Returns

boolean
True if device is mobile.

Public

public boolean
# isIphone( )

Checks if it is an iPhone

Checks if it is an iPhone

Returns

boolean
True if device is an iPhone.

Public

public boolean
# isIpad( )

Checks if it is an iPad

Checks if it is an iPad

Returns

boolean
True if device is an iPad.

Public

public boolean
# isAndroid( )

Checks if it is an Android

Checks if it is an Android

Returns

boolean
True if device is an Android.

Public

public boolean
# isOpera( )

Checks if the browser is Opera Mini

Checks if the browser is Opera Mini

Returns

boolean
True if browser is Opera Mini

Public

public boolean
# isBlackberry( )

Checks if it is a Blackberry

Checks if it is a Blackberry

Returns

boolean
True if device is a Blackberry.

Public

public boolean
# isPalm( )

Checks if it is a Palm device

Checks if it is a Palm device

Returns

boolean
True if device is a Palm device.

Public

public boolean
# isWindowsPhone( )

Checks if it is a Windows Phone

Checks if it is a Windows Phone

Returns

boolean
True if device is a Windows Phone.

Public

Properties summary
private boolean $iphone
# false
private boolean $ipad
# false
private boolean $android
# false
private boolean $opera
# false
private boolean $blackberry
# false
private boolean $palm
# false
private boolean $windowsPhone
# false
private boolean $mobileBrowser
# false
sleepyMUSTACHE v.0.8 API documentation generated by ApiGen