PHP 클래스 NukeViet\Client\Browser

파일 보기 프로젝트 열기: nukeviet/nukeviet

공개 메소드들

메소드 설명
__construct ( $userAgent = "" )
__toString ( ) : string Returns a formatted string with a summary of the details of the browser.
getAolVersion ( ) : string The version of AOL.
getBrowser ( ) : string The name of the browser. All return types are from the class contants
getBrowserKey ( ) : string The key of the browser. All return types are from the class contants
getPlatform ( ) : string The name of the platform. All return types are from the class contants
getPlatformKey ( )
getUserAgent ( ) : string Get the user agent value in use to determine the browser
getVersion ( ) : string The version of the browser.
isAol ( ) : boolean Is the browser from AOL?
isBrowser ( string $browserName ) : boolean Check to see if the specific browser is valid
isChromeFrame ( ) : boolean Used to determine if the browser is actually "chromeframe"
isFacebook ( ) : boolean Is the browser from facebook?
isMobile ( ) : boolean Is the browser from a mobile device?
isRobot ( ) : boolean Is the browser from a robot (ex Slurp,GoogleBot)?
isTablet ( ) : boolean Is the browser from a tablet device?
reset ( ) Reset all properties
setAol ( $isAol ) Set the browser to be from AOL
setAolVersion ( string $version ) Set the version of AOL
setBrowser ( $browser, $browser_name ) Set the name of the browser
setPlatform ( string $platform ) Set the name of the platform
setUserAgent ( string $agent_string ) Set the user agent value (the construction will use the HTTP header value - this will overwrite it)
setVersion ( string $version ) Set the version of the browser

보호된 메소드들

메소드 설명
checkBrowserAmaya ( ) : boolean Determine if the browser is Amaya or not (last updated 1.7)
checkBrowserAndroid ( ) : boolean Determine if the browser is Android or not (last updated 1.7)
checkBrowserBingBot ( ) : boolean Determine if the browser is the BingBot or not (last updated 1.9)
checkBrowserBlackBerry ( ) : boolean Determine if the user is using a BlackBerry (last updated 1.7)
checkBrowserChrome ( ) : boolean Determine if the browser is Chrome or not (last updated 1.7)
checkBrowserFirebird ( ) : boolean Determine if the browser is Firebird or not (last updated 1.7)
checkBrowserFirefox ( ) : boolean Determine if the browser is Firefox or not (last updated 1.7)
checkBrowserGaleon ( ) : boolean Determine if the browser is Galeon or not (last updated 1.7)
checkBrowserGoogleBot ( ) : boolean Determine if the browser is the GoogleBot or not (last updated 1.7)
checkBrowserIcab ( ) : boolean Determine if the browser is iCab or not (last updated 1.7)
checkBrowserIceCat ( ) : boolean Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7)
checkBrowserIceweasel ( ) : boolean Determine if the browser is Firefox or not (last updated 1.7)
checkBrowserInternetExplorer ( ) : boolean Determine if the browser is Internet Explorer or not (last updated 1.7)
checkBrowserKonqueror ( ) : boolean Determine if the browser is Konqueror or not (last updated 1.7)
checkBrowserLynx ( ) : boolean Determine if the browser is Lynx or not (last updated 1.7)
checkBrowserMSNBot ( ) : boolean Determine if the browser is the MSNBot or not (last updated 1.9)
checkBrowserMozilla ( ) : boolean Determine if the browser is Mozilla or not (last updated 1.7)
checkBrowserNetPositive ( ) : boolean Determine if the browser is NetPositive or not (last updated 1.7)
checkBrowserNetscapeNavigator9Plus ( ) : boolean Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7) NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008)
checkBrowserNokia ( ) : boolean Determine if the browser is Nokia or not (last updated 1.7)
checkBrowserOmniWeb ( ) : boolean Determine if the browser is OmniWeb or not (last updated 1.7)
checkBrowserOpera ( ) : boolean Determine if the browser is Opera or not (last updated 1.7)
checkBrowserPhoenix ( ) : boolean Determine if the browser is Phoenix or not (last updated 1.7)
checkBrowserSafari ( ) : boolean Determine if the browser is Safari or not (last updated 1.7)
checkBrowserShiretoko ( ) : boolean Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7)
checkBrowserSlurp ( ) : boolean Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7)
checkBrowserW3CValidator ( ) : boolean Determine if the browser is the W3C Validator or not (last updated 1.7)
checkBrowserWebTv ( ) : boolean Determine if the browser is WebTv or not (last updated 1.7)
checkBrowseriPad ( ) : boolean Determine if the browser is iPad or not (last updated 1.7)
checkBrowseriPhone ( ) : boolean Determine if the browser is iPhone or not (last updated 1.7)
checkBrowseriPod ( ) : boolean Determine if the browser is iPod or not (last updated 1.7)
checkBrowsers ( ) : boolean Protected routine to determine the browser type
checkFacebookExternalHit ( ) : boolean Detect if URL is loaded from FacebookExternalHit
checkForAol ( ) : boolean Determine if the user is using an AOL User Agent (last updated 1.7)
checkForFacebookIos ( ) : boolean Detect if URL is being loaded from internal Facebook browser
checkPlatform ( ) Determine the user's platform (last updated 1.7)
determine ( ) Protected routine to calculate and determine what the browser is in use (including platform)
getChromeVersionOnIos ( ) : boolean Detect Version for the Chrome browser on iOS devices
getSafariVersionOnIos ( ) : boolean Detect Version for the Safari browser on iOS devices
setFacebook ( boolean $value = true ) Set the Browser to be a Facebook request
setMobile ( boolean $value = true ) Set the Browser to be mobile
setRobot ( boolean $value = true ) Set the Browser to be a robot
setTablet ( boolean $value = true ) Set the Browser to be tablet

메소드 상세

__construct() 공개 메소드

public __construct ( $userAgent = "" )

__toString() 공개 메소드

Returns a formatted string with a summary of the details of the browser.
public __toString ( ) : string
리턴 string formatted string with a summary of the browser

checkBrowserAmaya() 보호된 메소드

Determine if the browser is Amaya or not (last updated 1.7)
protected checkBrowserAmaya ( ) : boolean
리턴 boolean True if the browser is Amaya otherwise false

checkBrowserAndroid() 보호된 메소드

Determine if the browser is Android or not (last updated 1.7)
protected checkBrowserAndroid ( ) : boolean
리턴 boolean True if the browser is Android otherwise false

checkBrowserBingBot() 보호된 메소드

Determine if the browser is the BingBot or not (last updated 1.9)
protected checkBrowserBingBot ( ) : boolean
리턴 boolean True if the browser is the BingBot otherwise false

checkBrowserBlackBerry() 보호된 메소드

Determine if the user is using a BlackBerry (last updated 1.7)
protected checkBrowserBlackBerry ( ) : boolean
리턴 boolean True if the browser is the BlackBerry browser otherwise false

checkBrowserChrome() 보호된 메소드

Determine if the browser is Chrome or not (last updated 1.7)
protected checkBrowserChrome ( ) : boolean
리턴 boolean True if the browser is Chrome otherwise false

checkBrowserFirebird() 보호된 메소드

Determine if the browser is Firebird or not (last updated 1.7)
protected checkBrowserFirebird ( ) : boolean
리턴 boolean True if the browser is Firebird otherwise false

checkBrowserFirefox() 보호된 메소드

Determine if the browser is Firefox or not (last updated 1.7)
protected checkBrowserFirefox ( ) : boolean
리턴 boolean True if the browser is Firefox otherwise false

checkBrowserGaleon() 보호된 메소드

Determine if the browser is Galeon or not (last updated 1.7)
protected checkBrowserGaleon ( ) : boolean
리턴 boolean True if the browser is Galeon otherwise false

checkBrowserGoogleBot() 보호된 메소드

Determine if the browser is the GoogleBot or not (last updated 1.7)
protected checkBrowserGoogleBot ( ) : boolean
리턴 boolean True if the browser is the GoogletBot otherwise false

checkBrowserIcab() 보호된 메소드

Determine if the browser is iCab or not (last updated 1.7)
protected checkBrowserIcab ( ) : boolean
리턴 boolean True if the browser is iCab otherwise false

checkBrowserIceCat() 보호된 메소드

Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7)
protected checkBrowserIceCat ( ) : boolean
리턴 boolean True if the browser is Ice Cat otherwise false

checkBrowserIceweasel() 보호된 메소드

Determine if the browser is Firefox or not (last updated 1.7)
protected checkBrowserIceweasel ( ) : boolean
리턴 boolean True if the browser is Firefox otherwise false

checkBrowserInternetExplorer() 보호된 메소드

Determine if the browser is Internet Explorer or not (last updated 1.7)
protected checkBrowserInternetExplorer ( ) : boolean
리턴 boolean True if the browser is Internet Explorer otherwise false

checkBrowserKonqueror() 보호된 메소드

Determine if the browser is Konqueror or not (last updated 1.7)
protected checkBrowserKonqueror ( ) : boolean
리턴 boolean True if the browser is Konqueror otherwise false

checkBrowserLynx() 보호된 메소드

Determine if the browser is Lynx or not (last updated 1.7)
protected checkBrowserLynx ( ) : boolean
리턴 boolean True if the browser is Lynx otherwise false

checkBrowserMSNBot() 보호된 메소드

Determine if the browser is the MSNBot or not (last updated 1.9)
protected checkBrowserMSNBot ( ) : boolean
리턴 boolean True if the browser is the MSNBot otherwise false

checkBrowserMozilla() 보호된 메소드

Determine if the browser is Mozilla or not (last updated 1.7)
protected checkBrowserMozilla ( ) : boolean
리턴 boolean True if the browser is Mozilla otherwise false

checkBrowserNetPositive() 보호된 메소드

Determine if the browser is NetPositive or not (last updated 1.7)
protected checkBrowserNetPositive ( ) : boolean
리턴 boolean True if the browser is NetPositive otherwise false

checkBrowserNetscapeNavigator9Plus() 보호된 메소드

Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7) NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008)
protected checkBrowserNetscapeNavigator9Plus ( ) : boolean
리턴 boolean True if the browser is Netscape Navigator 9+ otherwise false

checkBrowserNokia() 보호된 메소드

Determine if the browser is Nokia or not (last updated 1.7)
protected checkBrowserNokia ( ) : boolean
리턴 boolean True if the browser is Nokia otherwise false

checkBrowserOmniWeb() 보호된 메소드

Determine if the browser is OmniWeb or not (last updated 1.7)
protected checkBrowserOmniWeb ( ) : boolean
리턴 boolean True if the browser is OmniWeb otherwise false

checkBrowserOpera() 보호된 메소드

Determine if the browser is Opera or not (last updated 1.7)
protected checkBrowserOpera ( ) : boolean
리턴 boolean True if the browser is Opera otherwise false

checkBrowserPhoenix() 보호된 메소드

Determine if the browser is Phoenix or not (last updated 1.7)
protected checkBrowserPhoenix ( ) : boolean
리턴 boolean True if the browser is Phoenix otherwise false

checkBrowserSafari() 보호된 메소드

Determine if the browser is Safari or not (last updated 1.7)
protected checkBrowserSafari ( ) : boolean
리턴 boolean True if the browser is Safari otherwise false

checkBrowserShiretoko() 보호된 메소드

Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7)
protected checkBrowserShiretoko ( ) : boolean
리턴 boolean True if the browser is Shiretoko otherwise false

checkBrowserSlurp() 보호된 메소드

Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7)
protected checkBrowserSlurp ( ) : boolean
리턴 boolean True if the browser is the Yahoo! Slurp Robot otherwise false

checkBrowserW3CValidator() 보호된 메소드

Determine if the browser is the W3C Validator or not (last updated 1.7)
protected checkBrowserW3CValidator ( ) : boolean
리턴 boolean True if the browser is the W3C Validator otherwise false

checkBrowserWebTv() 보호된 메소드

Determine if the browser is WebTv or not (last updated 1.7)
protected checkBrowserWebTv ( ) : boolean
리턴 boolean True if the browser is WebTv otherwise false

checkBrowseriPad() 보호된 메소드

Determine if the browser is iPad or not (last updated 1.7)
protected checkBrowseriPad ( ) : boolean
리턴 boolean True if the browser is iPad otherwise false

checkBrowseriPhone() 보호된 메소드

Determine if the browser is iPhone or not (last updated 1.7)
protected checkBrowseriPhone ( ) : boolean
리턴 boolean True if the browser is iPhone otherwise false

checkBrowseriPod() 보호된 메소드

Determine if the browser is iPod or not (last updated 1.7)
protected checkBrowseriPod ( ) : boolean
리턴 boolean True if the browser is iPod otherwise false

checkBrowsers() 보호된 메소드

Protected routine to determine the browser type
protected checkBrowsers ( ) : boolean
리턴 boolean True if the browser was detected otherwise false

checkFacebookExternalHit() 보호된 메소드

Detect if URL is loaded from FacebookExternalHit
protected checkFacebookExternalHit ( ) : boolean
리턴 boolean True if it detects FacebookExternalHit otherwise false

checkForAol() 보호된 메소드

Determine if the user is using an AOL User Agent (last updated 1.7)
protected checkForAol ( ) : boolean
리턴 boolean True if the browser is from AOL otherwise false

checkForFacebookIos() 보호된 메소드

Detect if URL is being loaded from internal Facebook browser
protected checkForFacebookIos ( ) : boolean
리턴 boolean True if it detects internal Facebook browser otherwise false

checkPlatform() 보호된 메소드

Determine the user's platform (last updated 1.7)
protected checkPlatform ( )

determine() 보호된 메소드

Protected routine to calculate and determine what the browser is in use (including platform)
protected determine ( )

getAolVersion() 공개 메소드

The version of AOL.
public getAolVersion ( ) : string
리턴 string Version of AOL (will only contain alpha-numeric characters and a period)

getBrowser() 공개 메소드

The name of the browser. All return types are from the class contants
public getBrowser ( ) : string
리턴 string Name of the browser

getBrowserKey() 공개 메소드

The key of the browser. All return types are from the class contants
public getBrowserKey ( ) : string
리턴 string Key of the browser

getChromeVersionOnIos() 보호된 메소드

Detect Version for the Chrome browser on iOS devices
protected getChromeVersionOnIos ( ) : boolean
리턴 boolean True if it detects the version correctly otherwise false

getPlatform() 공개 메소드

The name of the platform. All return types are from the class contants
public getPlatform ( ) : string
리턴 string Name of the browser

getPlatformKey() 공개 메소드

public getPlatformKey ( )

getSafariVersionOnIos() 보호된 메소드

Detect Version for the Safari browser on iOS devices
protected getSafariVersionOnIos ( ) : boolean
리턴 boolean True if it detects the version correctly otherwise false

getUserAgent() 공개 메소드

Get the user agent value in use to determine the browser
public getUserAgent ( ) : string
리턴 string The user agent from the HTTP header

getVersion() 공개 메소드

The version of the browser.
public getVersion ( ) : string
리턴 string Version of the browser (will only contain alpha-numeric characters and a period)

isAol() 공개 메소드

Is the browser from AOL?
public isAol ( ) : boolean
리턴 boolean True if the browser is from AOL otherwise false

isBrowser() 공개 메소드

Check to see if the specific browser is valid
public isBrowser ( string $browserName ) : boolean
$browserName string
리턴 boolean True if the browser is the specified browser

isChromeFrame() 공개 메소드

Used to determine if the browser is actually "chromeframe"
부터: 1.7
public isChromeFrame ( ) : boolean
리턴 boolean True if the browser is using chromeframe

isFacebook() 공개 메소드

Is the browser from facebook?
public isFacebook ( ) : boolean
리턴 boolean True if the browser is from facebook otherwise false

isMobile() 공개 메소드

Is the browser from a mobile device?
public isMobile ( ) : boolean
리턴 boolean True if the browser is from a mobile device otherwise false

isRobot() 공개 메소드

Is the browser from a robot (ex Slurp,GoogleBot)?
public isRobot ( ) : boolean
리턴 boolean True if the browser is from a robot otherwise false

isTablet() 공개 메소드

Is the browser from a tablet device?
public isTablet ( ) : boolean
리턴 boolean True if the browser is from a tablet device otherwise false

reset() 공개 메소드

Reset all properties
public reset ( )

setAol() 공개 메소드

Set the browser to be from AOL
public setAol ( $isAol )
$isAol

setAolVersion() 공개 메소드

Set the version of AOL
public setAolVersion ( string $version )
$version string The version of AOL

setBrowser() 공개 메소드

Set the name of the browser
public setBrowser ( $browser, $browser_name )
$browser string The name of the Browser

setFacebook() 보호된 메소드

Set the Browser to be a Facebook request
protected setFacebook ( boolean $value = true )
$value boolean is the browser a robot or not

setMobile() 보호된 메소드

Set the Browser to be mobile
protected setMobile ( boolean $value = true )
$value boolean is the browser a mobile browser or not

setPlatform() 공개 메소드

Set the name of the platform
public setPlatform ( string $platform )
$platform string The name of the Platform

setRobot() 보호된 메소드

Set the Browser to be a robot
protected setRobot ( boolean $value = true )
$value boolean is the browser a robot or not

setTablet() 보호된 메소드

Set the Browser to be tablet
protected setTablet ( boolean $value = true )
$value boolean is the browser a tablet browser or not

setUserAgent() 공개 메소드

Set the user agent value (the construction will use the HTTP header value - this will overwrite it)
public setUserAgent ( string $agent_string )
$agent_string string The value for the User Agent

setVersion() 공개 메소드

Set the version of the browser
public setVersion ( string $version )
$version string The version of the Browser