BrowserDetector
in package
implements
DetectorInterface
Table of Contents
Interfaces
Constants
- FUNC_PREFIX = 'checkBrowser'
Properties
- $browser : Browser
- $browsersList : mixed
- $userAgentString : mixed
Methods
- checkBrowserAmaya() : bool
- Determine if the browser is Amaya.
- checkBrowserAndroid() : bool
- Determine if the browser is Android.
- checkBrowserBlackBerry() : bool
- Determine if the user is using a BlackBerry.
- checkBrowserChrome() : bool
- Determine if the browser is Chrome.
- checkBrowserDragon() : bool
- Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo.
- checkBrowserEdge() : bool
- Determine if the browser is Microsoft Edge.
- checkBrowserFirebird() : bool
- Determine if the browser is Firebird.
- checkBrowserFirefox() : bool
- Determine if the browser is Firefox.
- checkBrowserGaleon() : bool
- Determine if the browser is Galeon.
- checkBrowserGsa() : bool
- Determine if the browser is Google Search Appliance.
- checkBrowserIcab() : bool
- Determine if the browser is iCab.
- checkBrowserIceCat() : bool
- Determine if the browser is Ice Cat.
- checkBrowserIceweasel() : bool
- Determine if the browser is Iceweasel.
- checkBrowserInternetExplorer() : bool
- Determine if the browser is Internet Explorer.
- checkBrowserKonqueror() : bool
- Determine if the browser is Konqueror.
- checkBrowserLynx() : bool
- Determine if the browser is Lynx.
- checkBrowserMozilla() : bool
- Determine if the browser is Mozilla.
- checkBrowserNetPositive() : bool
- Determine if the browser is NetPositive.
- checkBrowserNetscapeNavigator9Plus() : bool
- Determine if the browser is Netscape Navigator 9+.
- checkBrowserNokia() : bool
- Determine if the browser is Nokia.
- checkBrowserOmniWeb() : bool
- Determine if the browser is OmniWeb.
- checkBrowserOpera() : bool
- Determine if the browser is Opera.
- checkBrowserPhoenix() : bool
- Determine if the browser is Phoenix.
- checkBrowserRobot() : bool
- Determine if the browser is a robot.
- checkBrowserSafari() : bool
- Determine if the browser is Safari.
- checkBrowserSamsung() : bool
- Determine if the browser is Samsung.
- checkBrowserSeaMonkey() : bool
- Determine if the browser is SeaMonkey.
- checkBrowserShiretoko() : bool
- Determine if the browser is Shiretoko.
- checkBrowserVivaldi() : bool
- Determine if the browser is Vivaldi.
- checkBrowserWebTv() : bool
- Determine if the browser is WebTv.
- checkBrowserWkhtmltopdf() : bool
- Determine if the browser is Safari.
- checkBrowserYandex() : bool
- Determine if the browser is Yandex.
- checkChromeFrame() : bool
- Determine if the user is using Chrome Frame.
- checkFacebookWebView() : bool
- Determine if the user is using Facebook.
- detect() : bool
- Routine to determine the browser type.
Constants
FUNC_PREFIX
public
mixed
FUNC_PREFIX
= 'checkBrowser'
Properties
$browser
protected
static Browser
$browser
$browsersList
protected
static mixed
$browsersList
= array(
// well-known, well-used
// Special Notes:
// (1) Opera must be checked before FireFox due to the odd
// user agents used in some older versions of Opera
// (2) WebTV is strapped onto Internet Explorer so we must
// check for WebTV before IE
// (3) Because of Internet Explorer 11 using
// "Mozilla/5.0 ([...] Trident/7.0; rv:11.0) like Gecko"
// as user agent, tests for IE must be run before any
// tests checking for "Mozilla"
// (4) (deprecated) Galeon is based on Firefox and needs to be
// tested before Firefox is tested
// (5) OmniWeb is based on Safari so OmniWeb check must occur
// before Safari
// (6) Netscape 9+ is based on Firefox so Netscape checks
// before FireFox are necessary
// (7) Microsoft Edge must be checked before Chrome and Safari
// (7) Vivaldi must be checked before Chrome
'WebTv',
'InternetExplorer',
'Edge',
'Opera',
'Vivaldi',
'Dragon',
'Galeon',
'NetscapeNavigator9Plus',
'SeaMonkey',
'Firefox',
'Yandex',
'Samsung',
'Chrome',
'OmniWeb',
// common mobile
'Android',
'BlackBerry',
'Nokia',
'Gsa',
// common bots
'Robot',
// wkhtmltopdf before Safari
'Wkhtmltopdf',
// WebKit base check (post mobile and others)
'Safari',
// everyone else
'NetPositive',
'Firebird',
'Konqueror',
'Icab',
'Phoenix',
'Amaya',
'Lynx',
'Shiretoko',
'IceCat',
'Iceweasel',
'Mozilla',
)
$userAgentString
protected
static mixed
$userAgentString
Methods
checkBrowserAmaya()
Determine if the browser is Amaya.
public
static checkBrowserAmaya() : bool
Return values
boolcheckBrowserAndroid()
Determine if the browser is Android.
public
static checkBrowserAndroid() : bool
Return values
boolcheckBrowserBlackBerry()
Determine if the user is using a BlackBerry.
public
static checkBrowserBlackBerry() : bool
Return values
boolcheckBrowserChrome()
Determine if the browser is Chrome.
public
static checkBrowserChrome() : bool
Return values
boolcheckBrowserDragon()
Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo.
public
static checkBrowserDragon() : bool
Return values
boolcheckBrowserEdge()
Determine if the browser is Microsoft Edge.
public
static checkBrowserEdge() : bool
Return values
boolcheckBrowserFirebird()
Determine if the browser is Firebird.
public
static checkBrowserFirebird() : bool
Return values
boolcheckBrowserFirefox()
Determine if the browser is Firefox.
public
static checkBrowserFirefox() : bool
Return values
boolcheckBrowserGaleon()
Determine if the browser is Galeon.
public
static checkBrowserGaleon() : bool
Return values
boolcheckBrowserGsa()
Determine if the browser is Google Search Appliance.
public
static checkBrowserGsa() : bool
Return values
boolcheckBrowserIcab()
Determine if the browser is iCab.
public
static checkBrowserIcab() : bool
Return values
boolcheckBrowserIceCat()
Determine if the browser is Ice Cat.
public
static checkBrowserIceCat() : bool
Return values
boolcheckBrowserIceweasel()
Determine if the browser is Iceweasel.
public
static checkBrowserIceweasel() : bool
Return values
boolcheckBrowserInternetExplorer()
Determine if the browser is Internet Explorer.
public
static checkBrowserInternetExplorer() : bool
Return values
boolcheckBrowserKonqueror()
Determine if the browser is Konqueror.
public
static checkBrowserKonqueror() : bool
Return values
boolcheckBrowserLynx()
Determine if the browser is Lynx.
public
static checkBrowserLynx() : bool
Return values
boolcheckBrowserMozilla()
Determine if the browser is Mozilla.
public
static checkBrowserMozilla() : bool
Return values
boolcheckBrowserNetPositive()
Determine if the browser is NetPositive.
public
static checkBrowserNetPositive() : bool
Return values
boolcheckBrowserNetscapeNavigator9Plus()
Determine if the browser is Netscape Navigator 9+.
public
static checkBrowserNetscapeNavigator9Plus() : bool
Return values
boolcheckBrowserNokia()
Determine if the browser is Nokia.
public
static checkBrowserNokia() : bool
Return values
boolcheckBrowserOmniWeb()
Determine if the browser is OmniWeb.
public
static checkBrowserOmniWeb() : bool
Return values
boolcheckBrowserOpera()
Determine if the browser is Opera.
public
static checkBrowserOpera() : bool
Return values
boolcheckBrowserPhoenix()
Determine if the browser is Phoenix.
public
static checkBrowserPhoenix() : bool
Return values
boolcheckBrowserRobot()
Determine if the browser is a robot.
public
static checkBrowserRobot() : bool
Return values
boolcheckBrowserSafari()
Determine if the browser is Safari.
public
static checkBrowserSafari() : bool
Return values
boolcheckBrowserSamsung()
Determine if the browser is Samsung.
public
static checkBrowserSamsung() : bool
Return values
boolcheckBrowserSeaMonkey()
Determine if the browser is SeaMonkey.
public
static checkBrowserSeaMonkey() : bool
Return values
boolcheckBrowserShiretoko()
Determine if the browser is Shiretoko.
public
static checkBrowserShiretoko() : bool
Return values
boolcheckBrowserVivaldi()
Determine if the browser is Vivaldi.
public
static checkBrowserVivaldi() : bool
Return values
boolcheckBrowserWebTv()
Determine if the browser is WebTv.
public
static checkBrowserWebTv() : bool
Return values
boolcheckBrowserWkhtmltopdf()
Determine if the browser is Safari.
public
static checkBrowserWkhtmltopdf() : bool
Return values
boolcheckBrowserYandex()
Determine if the browser is Yandex.
public
static checkBrowserYandex() : bool
Return values
boolcheckChromeFrame()
Determine if the user is using Chrome Frame.
public
static checkChromeFrame() : bool
Return values
boolcheckFacebookWebView()
Determine if the user is using Facebook.
public
static checkFacebookWebView() : bool
Return values
booldetect()
Routine to determine the browser type.
public
static detect(Browser $browser[, UserAgent $userAgent = null ]) : bool