Constants

UNKNOWN

UNKNOWN = 'unknown'

VIVALDI

VIVALDI = 'Vivaldi'

OPERA

OPERA = 'Opera'

OPERA_MINI

OPERA_MINI = 'Opera Mini'

WEBTV

WEBTV = 'WebTV'

IE

IE = 'Internet Explorer'

POCKET_IE

POCKET_IE = 'Pocket Internet Explorer'

KONQUEROR

KONQUEROR = 'Konqueror'

ICAB

ICAB = 'iCab'

OMNIWEB

OMNIWEB = 'OmniWeb'

FIREBIRD

FIREBIRD = 'Firebird'

FIREFOX

FIREFOX = 'Firefox'

SEAMONKEY

SEAMONKEY = 'SeaMonkey'

ICEWEASEL

ICEWEASEL = 'Iceweasel'

SHIRETOKO

SHIRETOKO = 'Shiretoko'

MOZILLA

MOZILLA = 'Mozilla'

AMAYA

AMAYA = 'Amaya'

LYNX

LYNX = 'Lynx'

SAFARI

SAFARI = 'Safari'

CHROME

CHROME = 'Chrome'

NAVIGATOR

NAVIGATOR = 'Navigator'

GOOGLEBOT

GOOGLEBOT = 'GoogleBot'

SLURP

SLURP = 'Yahoo! Slurp'

W3CVALIDATOR

W3CVALIDATOR = 'W3C Validator'

BLACKBERRY

BLACKBERRY = 'BlackBerry'

ICECAT

ICECAT = 'IceCat'

NOKIA_S60

NOKIA_S60 = 'Nokia S60 OSS Browser'

NOKIA

NOKIA = 'Nokia Browser'

MSN

MSN = 'MSN Browser'

MSNBOT

MSNBOT = 'MSN Bot'

NETSCAPE_NAVIGATOR

NETSCAPE_NAVIGATOR = 'Netscape Navigator'

GALEON

GALEON = 'Galeon'

NETPOSITIVE

NETPOSITIVE = 'NetPositive'

PHOENIX

PHOENIX = 'Phoenix'

GSA

GSA = 'Google Search Appliance'

YANDEX

YANDEX = 'Yandex'

EDGE

EDGE = 'Edge'

DRAGON

DRAGON = 'Dragon'

BAIDUBOT

BAIDUBOT = 'BaiduBot'

SOGOUBOT

SOGOUBOT = 'SogouBot'

UC

UC = 'UC'

BAIDU

BAIDU = 'Baidu'

QQ

QQ = 'QQ'

B360

B360 = '360'

LIEBAO

LIEBAO = 'LieBao'

VERSION_UNKNOWN

VERSION_UNKNOWN = 'unknown'

Properties

$userAgent

$userAgent : \apanly\BrowserDetector\UserAgent

Type

UserAgent

$name

$name : string

Type

string

$version

$version : string

Type

string

$isRobot

$isRobot : bool

Type

bool

$isChromeFrame

$isChromeFrame : bool

Type

bool

$isFacebookWebView

$isFacebookWebView : bool

Type

bool

$isCompatibilityMode

$isCompatibilityMode : bool

Type

bool

Methods

__construct()

__construct(null|string|\apanly\BrowserDetector\UserAgent  $userAgent = null) : mixed

Parameters

null|string|\apanly\BrowserDetector\UserAgent $userAgent

Throws

\apanly\BrowserDetector\InvalidArgumentException

Returns

mixed —

setName()

setName(string  $name) : $this

Set the name of the OS.

Parameters

string $name

Returns

$this —

getName()

getName() : string

Return the name of the Browser.

Returns

string —

isBrowser()

isBrowser(string  $name) : bool

Check to see if the specific browser is valid.

Parameters

string $name

Returns

bool —

setVersion()

setVersion(string  $version) : $this

Set the version of the browser.

Parameters

string $version

Returns

$this —

getVersion()

getVersion() : string

The version of the browser.

Returns

string —

setIsRobot()

setIsRobot(bool  $isRobot) : $this

Set the Browser to be a robot.

Parameters

bool $isRobot

Returns

$this —

getIsRobot()

getIsRobot() : bool

Is the browser from a robot (ex Slurp,GoogleBot)?

Returns

bool —

isRobot()

isRobot() : bool

Returns

bool —

setIsChromeFrame()

setIsChromeFrame(bool  $isChromeFrame) : $this

Parameters

bool $isChromeFrame

Returns

$this —

getIsChromeFrame()

getIsChromeFrame() : bool

Used to determine if the browser is actually "chromeframe".

Returns

bool —

isChromeFrame()

isChromeFrame() : bool

Returns

bool —

setIsFacebookWebView()

setIsFacebookWebView(bool  $isFacebookWebView) : $this

Parameters

bool $isFacebookWebView

Returns

$this —

getIsFacebookWebView()

getIsFacebookWebView() : bool

Used to determine if the browser is actually "facebook".

Returns

bool —

isFacebookWebView()

isFacebookWebView() : bool

Returns

bool —

setUserAgent()

setUserAgent(\apanly\BrowserDetector\UserAgent  $userAgent) : $this

Parameters

\apanly\BrowserDetector\UserAgent $userAgent

Returns

$this —

getUserAgent()

getUserAgent() : \apanly\BrowserDetector\UserAgent

Returns

\apanly\BrowserDetector\UserAgent —

setIsCompatibilityMode()

setIsCompatibilityMode(mixed  $isCompatibilityMode) : $this

Parameters

mixed $isCompatibilityMode

Returns

$this —

isCompatibilityMode()

isCompatibilityMode() : bool

Returns

bool —

endCompatibilityMode()

endCompatibilityMode() : mixed

Render pages outside of IE's compatibility mode.

Returns

mixed —