Properties

$platforms

$platforms : 

Type

$browsers

$browsers : 

Type

$mobiles

$mobiles : 

Type

$robots

$robots : 

Type

$agent

$agent : 

Type

$is_browser

$is_browser : 

Type

$is_robot

$is_robot : 

Type

$is_mobile

$is_mobile : 

Type

$languages

$languages : 

Type

$charsets

$charsets : 

Type

$platform

$platform : 

Type

$browser

$browser : 

Type

$version

$version : 

Type

$mobile

$mobile : 

Type

$robot

$robot : 

Type

Methods

__construct()

__construct(string  $agent = '') 

Constructor

Sets the User Agent and runs the compilation routine

Parameters

string $agent

isBrowser()

isBrowser(null  $key = null) : boolean

Is Browser

Parameters

null $key

Returns

boolean

isRobot()

isRobot(null  $key = null) : boolean

Is Robot

Parameters

null $key

Returns

boolean

isMobile()

isMobile(null  $key = null) : boolean

Is Mobile

Parameters

null $key

Returns

boolean

isReferral()

isReferral() : boolean

Is this a referral from another site?

Returns

boolean

agentString()

agentString() : boolean

Agent String

Returns

boolean

platform()

platform() : string

Get Platform

Returns

string

browser()

browser() : string

Get Browser Name

Returns

string

version()

version() : string

Get the Browser Version

Returns

string

robot()

robot() : string

Get The Robot Name

Returns

string

mobile()

mobile() : string

Get the Mobile Device

Returns

string

referrer()

referrer() : boolean

Get the referrer

Returns

boolean

languages()

languages() : array

Get the accepted languages

Returns

array

charsets()

charsets() : array

Get the accepted Character Sets

Returns

array

acceptLang()

acceptLang(string  $lang = 'en') : boolean

Test for a particular language

Parameters

string $lang

Returns

boolean

acceptCharset()

acceptCharset(string  $charset = 'utf-8') : boolean

Test for a particular character set

Parameters

string $charset

Returns

boolean

compileData()

compileData() 

Compile the User Agent Data

setPlatform()

setPlatform() 

Set the Platform

setBrowser()

setBrowser() : boolean

Set the Browser

Returns

boolean

setRobot()

setRobot() : boolean

Set the Robot

Returns

boolean

setMobile()

setMobile() : boolean

Set the Mobile Device

Returns

boolean

setLanguages()

setLanguages() : void

Set the accepted languages

setCharsets()

setCharsets() : void

Set the accepted character sets