PHP Class Pop\Web\Mobile

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$android boolean Android flag
$apple boolean Apple flag
$blackberry boolean Blackberry flag
$desktopUrl string Desktop website destination URL
$device string Mobile Device
$force integer Force flag
$mobile boolean Mobile detect flag
$mobileUrl string Mobile website destination URL
$opera boolean Opera flag
$pre boolean Pre flag
$tablet boolean Tablet detect flag
$ua string User agent property
$windows boolean Windows flag

Méthodes publiques

Méthode Description
__construct ( string $mobile = null, string $desktop = null, integer $force ) : Mobile Constructor
getDesktopUrl ( ) : string Method to get desktop URL
getDevice ( ) : string Method to get device name
getForce ( ) : integer Method to get force flag
getMobileDevice ( ) : string Static method to only get the mobile device.
getMobileUrl ( ) : string Method to get mobile URL
getUa ( ) : string Method to get user-agent
goToDesktop ( ) : void Method to go to the desktop site.
goToMobile ( ) : void Method to go to the mobile site.
goToURL ( string $url ) : void Method to go to a specific URL.
isAndroid ( ) : boolean Method to get Android flag
isApple ( ) : boolean Method to get Apple flag
isBlackberry ( ) : boolean Method to get Blackberry flag
isMobile ( ) : boolean Method to get is mobile flag
isMobileDevice ( ) : boolean Static method to only detect a mobile device or not.
isOpera ( ) : boolean Method to get Opera flag
isPre ( ) : boolean Method to get Pre flag
isTablet ( ) : boolean Method to get is tablet flag
isTabletDevice ( ) : boolean Static method to only detect a tablet device or not.
isWindows ( ) : boolean Method to get Windows flag
route ( ) : void Method to route to the appropriate URL
setDesktopUrl ( string $url ) : Mobile Method to set desktop URL
setForce ( integer $force ) : Mobile Method to set force flag
setMobileUrl ( string $url ) : Mobile Method to set mobile URL

Méthodes protégées

Méthode Description
detect ( ) : boolean Method to detect whether or not the device is a mobile device or not.

Method Details

__construct() public méthode

Instantiate the mobile session object.
public __construct ( string $mobile = null, string $desktop = null, integer $force ) : Mobile
$mobile string
$desktop string
$force integer
Résultat Mobile

detect() protected méthode

Method to detect whether or not the device is a mobile device or not.
protected detect ( ) : boolean
Résultat boolean

getDesktopUrl() public méthode

Method to get desktop URL
public getDesktopUrl ( ) : string
Résultat string

getDevice() public méthode

Method to get device name
public getDevice ( ) : string
Résultat string

getForce() public méthode

Method to get force flag
public getForce ( ) : integer
Résultat integer

getMobileDevice() public static méthode

Static method to only get the mobile device.
public static getMobileDevice ( ) : string
Résultat string

getMobileUrl() public méthode

Method to get mobile URL
public getMobileUrl ( ) : string
Résultat string

getUa() public méthode

Method to get user-agent
public getUa ( ) : string
Résultat string

goToDesktop() public méthode

Method to go to the desktop site.
public goToDesktop ( ) : void
Résultat void

goToMobile() public méthode

Method to go to the mobile site.
public goToMobile ( ) : void
Résultat void

goToURL() public méthode

Method to go to a specific URL.
public goToURL ( string $url ) : void
$url string
Résultat void

isAndroid() public méthode

Method to get Android flag
public isAndroid ( ) : boolean
Résultat boolean

isApple() public méthode

Method to get Apple flag
public isApple ( ) : boolean
Résultat boolean

isBlackberry() public méthode

Method to get Blackberry flag
public isBlackberry ( ) : boolean
Résultat boolean

isMobile() public méthode

Method to get is mobile flag
public isMobile ( ) : boolean
Résultat boolean

isMobileDevice() public static méthode

Static method to only detect a mobile device or not.
public static isMobileDevice ( ) : boolean
Résultat boolean

isOpera() public méthode

Method to get Opera flag
public isOpera ( ) : boolean
Résultat boolean

isPre() public méthode

Method to get Pre flag
public isPre ( ) : boolean
Résultat boolean

isTablet() public méthode

Method to get is tablet flag
public isTablet ( ) : boolean
Résultat boolean

isTabletDevice() public static méthode

Static method to only detect a tablet device or not.
public static isTabletDevice ( ) : boolean
Résultat boolean

isWindows() public méthode

Method to get Windows flag
public isWindows ( ) : boolean
Résultat boolean

route() public méthode

Method to route to the appropriate URL
public route ( ) : void
Résultat void

setDesktopUrl() public méthode

Method to set desktop URL
public setDesktopUrl ( string $url ) : Mobile
$url string
Résultat Mobile

setForce() public méthode

Method to set force flag
public setForce ( integer $force ) : Mobile
$force integer
Résultat Mobile

setMobileUrl() public méthode

Method to set mobile URL
public setMobileUrl ( string $url ) : Mobile
$url string
Résultat Mobile

Property Details

$android protected_oe property

Android flag
protected bool $android
Résultat boolean

$apple protected_oe property

Apple flag
protected bool $apple
Résultat boolean

$blackberry protected_oe property

Blackberry flag
protected bool $blackberry
Résultat boolean

$desktopUrl protected_oe property

Desktop website destination URL
protected string $desktopUrl
Résultat string

$device protected_oe property

Mobile Device
protected string $device
Résultat string

$force protected_oe property

Force flag
protected int $force
Résultat integer

$mobile protected_oe property

Mobile detect flag
protected bool $mobile
Résultat boolean

$mobileUrl protected_oe property

Mobile website destination URL
protected string $mobileUrl
Résultat string

$opera protected_oe property

Opera flag
protected bool $opera
Résultat boolean

$pre protected_oe property

Pre flag
protected bool $pre
Résultat boolean

$tablet protected_oe property

Tablet detect flag
protected bool $tablet
Résultat boolean

$ua protected_oe property

User agent property
protected string $ua
Résultat string

$windows protected_oe property

Windows flag
protected bool $windows
Résultat boolean