PHP Класс Pop\Web\Mobile

Автор: Nick Sagona, III ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
detect ( ) : boolean Method to detect whether or not the device is a mobile device or not.

Описание методов

__construct() публичный метод

Instantiate the mobile session object.
public __construct ( string $mobile = null, string $desktop = null, integer $force ) : Mobile
$mobile string
$desktop string
$force integer
Результат Mobile

detect() защищенный метод

Method to detect whether or not the device is a mobile device or not.
protected detect ( ) : boolean
Результат boolean

getDesktopUrl() публичный метод

Method to get desktop URL
public getDesktopUrl ( ) : string
Результат string

getDevice() публичный метод

Method to get device name
public getDevice ( ) : string
Результат string

getForce() публичный метод

Method to get force flag
public getForce ( ) : integer
Результат integer

getMobileDevice() публичный статический метод

Static method to only get the mobile device.
public static getMobileDevice ( ) : string
Результат string

getMobileUrl() публичный метод

Method to get mobile URL
public getMobileUrl ( ) : string
Результат string

getUa() публичный метод

Method to get user-agent
public getUa ( ) : string
Результат string

goToDesktop() публичный метод

Method to go to the desktop site.
public goToDesktop ( ) : void
Результат void

goToMobile() публичный метод

Method to go to the mobile site.
public goToMobile ( ) : void
Результат void

goToURL() публичный метод

Method to go to a specific URL.
public goToURL ( string $url ) : void
$url string
Результат void

isAndroid() публичный метод

Method to get Android flag
public isAndroid ( ) : boolean
Результат boolean

isApple() публичный метод

Method to get Apple flag
public isApple ( ) : boolean
Результат boolean

isBlackberry() публичный метод

Method to get Blackberry flag
public isBlackberry ( ) : boolean
Результат boolean

isMobile() публичный метод

Method to get is mobile flag
public isMobile ( ) : boolean
Результат boolean

isMobileDevice() публичный статический метод

Static method to only detect a mobile device or not.
public static isMobileDevice ( ) : boolean
Результат boolean

isOpera() публичный метод

Method to get Opera flag
public isOpera ( ) : boolean
Результат boolean

isPre() публичный метод

Method to get Pre flag
public isPre ( ) : boolean
Результат boolean

isTablet() публичный метод

Method to get is tablet flag
public isTablet ( ) : boolean
Результат boolean

isTabletDevice() публичный статический метод

Static method to only detect a tablet device or not.
public static isTabletDevice ( ) : boolean
Результат boolean

isWindows() публичный метод

Method to get Windows flag
public isWindows ( ) : boolean
Результат boolean

route() публичный метод

Method to route to the appropriate URL
public route ( ) : void
Результат void

setDesktopUrl() публичный метод

Method to set desktop URL
public setDesktopUrl ( string $url ) : Mobile
$url string
Результат Mobile

setForce() публичный метод

Method to set force flag
public setForce ( integer $force ) : Mobile
$force integer
Результат Mobile

setMobileUrl() публичный метод

Method to set mobile URL
public setMobileUrl ( string $url ) : Mobile
$url string
Результат Mobile

Описание свойств

$android защищенное свойство

Android flag
protected bool $android
Результат boolean

$apple защищенное свойство

Apple flag
protected bool $apple
Результат boolean

$blackberry защищенное свойство

Blackberry flag
protected bool $blackberry
Результат boolean

$desktopUrl защищенное свойство

Desktop website destination URL
protected string $desktopUrl
Результат string

$device защищенное свойство

Mobile Device
protected string $device
Результат string

$force защищенное свойство

Force flag
protected int $force
Результат integer

$mobile защищенное свойство

Mobile detect flag
protected bool $mobile
Результат boolean

$mobileUrl защищенное свойство

Mobile website destination URL
protected string $mobileUrl
Результат string

$opera защищенное свойство

Opera flag
protected bool $opera
Результат boolean

$pre защищенное свойство

Pre flag
protected bool $pre
Результат boolean

$tablet защищенное свойство

Tablet detect flag
protected bool $tablet
Результат boolean

$ua защищенное свойство

User agent property
protected string $ua
Результат string

$windows защищенное свойство

Windows flag
protected bool $windows
Результат boolean