Constants

DESKTOP

DESKTOP

Constant to route desktop display

TABLET

TABLET

Constant to route tablet display

MOBILE

MOBILE

Constant to route mobile display

Properties

$ua

$ua : string

User agent property

Type

string

$device

$device : string

Mobile Device

Type

string

$desktopUrl

$desktopUrl : string

Desktop website destination URL

Type

string

$tabletUrl

$tabletUrl : string

Mobile website destination URL

Type

string

$mobileUrl

$mobileUrl : string

Mobile website destination URL

Type

string

$route

$route : string

Route flag

Type

string

$desktop

$desktop : boolean

Desktop detect flag

Type

boolean

$tablet

$tablet : boolean

Tablet detect flag

Type

boolean

$mobile

$mobile : boolean

Mobile detect flag

Type

boolean

$android

$android : boolean

Android flag

Type

boolean

$apple

$apple : boolean

Apple flag

Type

boolean

$windows

$windows : boolean

Windows flag

Type

boolean

$blackberry

$blackberry : boolean

Blackberry flag

Type

boolean

$pre

$pre : boolean

Pre flag

Type

boolean

$opera

$opera : boolean

Opera flag

Type

boolean

Methods

__construct()

__construct(array  $options = array()) : \Pop\Web\Mobile

Constructor

Instantiate the mobile object

Parameters

array $options

Returns

\Pop\Web\Mobile

isDesktopDevice()

isDesktopDevice() : boolean

Static method to only detect a desktop device or not

Returns

boolean

isTabletDevice()

isTabletDevice() : boolean

Static method to only detect a tablet device or not

Returns

boolean

isMobileDevice()

isMobileDevice() : boolean

Static method to only detect a mobile device or not

Returns

boolean

getDevice()

getDevice() : string

Static method to only get the mobile device

Returns

string

getUa()

getUa() : string

Get user-agent

Returns

string

getDeviceName()

getDeviceName() : string

Get device name

Returns

string

getDesktopUrl()

getDesktopUrl() : string

Get desktop URL

Returns

string

getTabletUrl()

getTabletUrl() : string

Get tablet URL

Returns

string

getMobileUrl()

getMobileUrl() : string

Get mobile URL

Returns

string

getRoute()

getRoute() : string

Get route flag

Returns

string

setDesktopUrl()

setDesktopUrl(string  $url) : \Pop\Web\Mobile

Set desktop URL

Parameters

string $url

Returns

\Pop\Web\Mobile

setTabletUrl()

setTabletUrl(string  $url) : \Pop\Web\Mobile

Set tablet URL

Parameters

string $url

Returns

\Pop\Web\Mobile

setMobileUrl()

setMobileUrl(string  $url) : \Pop\Web\Mobile

Set mobile URL

Parameters

string $url

Returns

\Pop\Web\Mobile

setRoute()

setRoute(string  $route) : \Pop\Web\Mobile

Set route flag

Parameters

string $route

Returns

\Pop\Web\Mobile

isDesktop()

isDesktop() : boolean

Set is desktop flag

Returns

boolean

isTablet()

isTablet() : boolean

Get is tablet flag

Returns

boolean

isMobile()

isMobile() : boolean

Get is mobile flag

Returns

boolean

isAndroid()

isAndroid() : boolean

Get Android flag

Returns

boolean

isApple()

isApple() : boolean

Get Apple flag

Returns

boolean

isWindows()

isWindows() : boolean

Get Windows flag

Returns

boolean

isBlackberry()

isBlackberry() : boolean

Get Blackberry flag

Returns

boolean

isPre()

isPre() : boolean

Get Pre flag

Returns

boolean

isOpera()

isOpera() : boolean

Get Opera flag

Returns

boolean

goToDesktop()

goToDesktop() : void

Go to the desktop site

Throws

\Pop\Web\Exception

goToTablet()

goToTablet() : void

Go to the tablet site

Throws

\Pop\Web\Exception

goToMobile()

goToMobile() : void

Go to the mobile site

Throws

\Pop\Web\Exception

goToURL()

goToURL(string  $url) : void

Go to a specific URL

Parameters

string $url

route()

route() : void

Route to the appropriate URL

detect()

detect() : void

Detect whether or not the device is a mobile device or not