Documentation

Browser
in package

Browser Detection.

Table of Contents

Constants

AMAYA  = 'Amaya'
BLACKBERRY  = 'BlackBerry'
CHROME  = 'Chrome'
DRAGON  = 'Dragon'
EDGE  = 'Edge'
FIREBIRD  = 'Firebird'
FIREFOX  = 'Firefox'
GALEON  = 'Galeon'
GOOGLEBOT  = 'GoogleBot'
GSA  = 'Google Search Appliance'
ICAB  = 'iCab'
ICECAT  = 'IceCat'
ICEWEASEL  = 'Iceweasel'
IE  = 'Internet Explorer'
KONQUEROR  = 'Konqueror'
LYNX  = 'Lynx'
MOZILLA  = 'Mozilla'
MSN  = 'MSN Browser'
MSNBOT  = 'MSN Bot'
NAVIGATOR  = 'Navigator'
NETPOSITIVE  = 'NetPositive'
NETSCAPE_NAVIGATOR  = 'Netscape Navigator'
NOKIA  = 'Nokia Browser'
NOKIA_S60  = 'Nokia S60 OSS Browser'
OMNIWEB  = 'OmniWeb'
OPERA  = 'Opera'
OPERA_MINI  = 'Opera Mini'
PHOENIX  = 'Phoenix'
POCKET_IE  = 'Pocket Internet Explorer'
SAFARI  = 'Safari'
SAMSUNG_BROWSER  = 'SamsungBrowser'
SEAMONKEY  = 'SeaMonkey'
SHIRETOKO  = 'Shiretoko'
SLURP  = 'Yahoo! Slurp'
UNKNOWN  = 'unknown'
VERSION_UNKNOWN  = 'unknown'
VIVALDI  = 'Vivaldi'
W3CVALIDATOR  = 'W3C Validator'
WEBTV  = 'WebTV'
WKHTMLTOPDF  = 'wkhtmltopdf'
YANDEX  = 'Yandex'

Properties

$isChromeFrame  : bool
$isCompatibilityMode  : bool
$isFacebookWebView  : bool
$isRobot  : bool
$name  : string
$userAgent  : UserAgent
$version  : string

Methods

__construct()  : mixed
endCompatibilityMode()  : mixed
Render pages outside of IE's compatibility mode.
getIsChromeFrame()  : bool
Used to determine if the browser is actually "chromeframe".
getIsFacebookWebView()  : bool
Used to determine if the browser is actually "facebook".
getIsRobot()  : bool
Is the browser from a robot (ex Slurp,GoogleBot)?
getName()  : string
Return the name of the Browser.
getUserAgent()  : UserAgent
getVersion()  : string
The version of the browser.
isBrowser()  : bool
Check to see if the specific browser is valid.
isChromeFrame()  : bool
isCompatibilityMode()  : bool
isFacebookWebView()  : bool
isRobot()  : bool
setIsChromeFrame()  : $this
setIsCompatibilityMode()  : $this
setIsFacebookWebView()  : $this
setIsRobot()  : $this
Set the Browser to be a robot.
setName()  : $this
Set the name of the OS.
setUserAgent()  : $this
setVersion()  : $this
Set the version of the browser.

Constants

BLACKBERRY

public mixed BLACKBERRY = 'BlackBerry'

CHROME

public mixed CHROME = 'Chrome'

DRAGON

public mixed DRAGON = 'Dragon'

FIREBIRD

public mixed FIREBIRD = 'Firebird'

FIREFOX

public mixed FIREFOX = 'Firefox'

GALEON

public mixed GALEON = 'Galeon'

GOOGLEBOT

public mixed GOOGLEBOT = 'GoogleBot'

GSA

public mixed GSA = 'Google Search Appliance'

ICECAT

public mixed ICECAT = 'IceCat'

ICEWEASEL

public mixed ICEWEASEL = 'Iceweasel'

IE

public mixed IE = 'Internet Explorer'

KONQUEROR

public mixed KONQUEROR = 'Konqueror'

MOZILLA

public mixed MOZILLA = 'Mozilla'

MSN

public mixed MSN = 'MSN Browser'

MSNBOT

public mixed MSNBOT = 'MSN Bot'

NAVIGATOR

public mixed NAVIGATOR = 'Navigator'

NETPOSITIVE

public mixed NETPOSITIVE = 'NetPositive'

NETSCAPE_NAVIGATOR

public mixed NETSCAPE_NAVIGATOR = 'Netscape Navigator'

NOKIA

public mixed NOKIA = 'Nokia Browser'

NOKIA_S60

public mixed NOKIA_S60 = 'Nokia S60 OSS Browser'

OMNIWEB

public mixed OMNIWEB = 'OmniWeb'

OPERA_MINI

public mixed OPERA_MINI = 'Opera Mini'

PHOENIX

public mixed PHOENIX = 'Phoenix'

POCKET_IE

public mixed POCKET_IE = 'Pocket Internet Explorer'

SAFARI

public mixed SAFARI = 'Safari'

SAMSUNG_BROWSER

public mixed SAMSUNG_BROWSER = 'SamsungBrowser'

SEAMONKEY

public mixed SEAMONKEY = 'SeaMonkey'

SHIRETOKO

public mixed SHIRETOKO = 'Shiretoko'

SLURP

public mixed SLURP = 'Yahoo! Slurp'

UNKNOWN

public mixed UNKNOWN = 'unknown'

VERSION_UNKNOWN

public mixed VERSION_UNKNOWN = 'unknown'

VIVALDI

public mixed VIVALDI = 'Vivaldi'

W3CVALIDATOR

public mixed W3CVALIDATOR = 'W3C Validator'

WKHTMLTOPDF

public mixed WKHTMLTOPDF = 'wkhtmltopdf'

YANDEX

public mixed YANDEX = 'Yandex'

Properties

$isChromeFrame

private bool $isChromeFrame = false

$isCompatibilityMode

private bool $isCompatibilityMode = false

$isFacebookWebView

private bool $isFacebookWebView = false

$isRobot

private bool $isRobot = false

Methods

__construct()

public __construct([null|string|UserAgent $userAgent = null ]) : mixed
Parameters
$userAgent : null|string|UserAgent = null
Tags
throws
InvalidArgumentException

endCompatibilityMode()

Render pages outside of IE's compatibility mode.

public endCompatibilityMode() : mixed

getIsChromeFrame()

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

public getIsChromeFrame() : bool
Return values
bool

getIsFacebookWebView()

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

public getIsFacebookWebView() : bool
Return values
bool

getIsRobot()

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

public getIsRobot() : bool
Return values
bool

getName()

Return the name of the Browser.

public getName() : string
Return values
string

getVersion()

The version of the browser.

public getVersion() : string
Return values
string

isBrowser()

Check to see if the specific browser is valid.

public isBrowser(string $name) : bool
Parameters
$name : string
Return values
bool

isChromeFrame()

public isChromeFrame() : bool
Return values
bool

isCompatibilityMode()

public isCompatibilityMode() : bool
Return values
bool

isFacebookWebView()

public isFacebookWebView() : bool
Return values
bool

isRobot()

public isRobot() : bool
Return values
bool

setIsChromeFrame()

public setIsChromeFrame(bool $isChromeFrame) : $this
Parameters
$isChromeFrame : bool
Return values
$this

setIsCompatibilityMode()

public setIsCompatibilityMode(mixed $isCompatibilityMode) : $this
Parameters
$isCompatibilityMode : mixed
Return values
$this

setIsFacebookWebView()

public setIsFacebookWebView(bool $isFacebookWebView) : $this
Parameters
$isFacebookWebView : bool
Return values
$this

setIsRobot()

Set the Browser to be a robot.

public setIsRobot(bool $isRobot) : $this
Parameters
$isRobot : bool
Return values
$this

setName()

Set the name of the OS.

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setVersion()

Set the version of the browser.

public setVersion(string $version) : $this
Parameters
$version : string
Return values
$this

        
On this page

Search results