PHP 클래스 phpUserAgent, php-user-agent

파일 보기 프로젝트 열기: ornicar/php-user-agent 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$browserName
$browserVersion
$engine
$operatingSystem
$userAgentString

공개 메소드들

메소드 설명
__construct ( $userAgentString = null, phpUserAgentStringParser $userAgentStringParser = null )
__toString ( )
configureFromUserAgentString ( string $userAgentString, phpUserAgentStringParser $userAgentStringParser = null ) Configure the user agent from a user agent string
fromArray ( array $data ) Configure the user agent from a data array
getBrowserName ( ) : string Get the browser name
getBrowserVersion ( ) : string Get the browser version
getEngine ( ) : string Get the engine name
getFullName ( ) : string
getOperatingSystem ( ) : string Get the operating system name
getUserAgentString ( ) : string Get the user agent string
isUnknown ( ) : boolean Tell whether this user agent is unknown or not
setBrowserName ( string $name ) Set the browser name
setBrowserVersion ( string $version ) Set the browser version
setEngine ( $engine ) Set the engine name
setOperatingSystem ( string $operatingSystem ) Set the operating system name
setUserAgentString ( string $userAgentString ) Set the user agent string
toArray ( ) : array Convert the user agent to a data array

메소드 상세

__construct() 공개 메소드

public __construct ( $userAgentString = null, phpUserAgentStringParser $userAgentStringParser = null )
$userAgentStringParser phpUserAgentStringParser

__toString() 공개 메소드

public __toString ( )

configureFromUserAgentString() 공개 메소드

Configure the user agent from a user agent string
public configureFromUserAgentString ( string $userAgentString, phpUserAgentStringParser $userAgentStringParser = null )
$userAgentString string the user agent string
$userAgentStringParser phpUserAgentStringParser the parser used to parse the string

fromArray() 공개 메소드

Configure the user agent from a data array
public fromArray ( array $data )
$data array

getBrowserName() 공개 메소드

Get the browser name
public getBrowserName ( ) : string
리턴 string the browser name

getBrowserVersion() 공개 메소드

Get the browser version
public getBrowserVersion ( ) : string
리턴 string the browser version

getEngine() 공개 메소드

Get the engine name
public getEngine ( ) : string
리턴 string the engine name

getFullName() 공개 메소드

public getFullName ( ) : string
리턴 string combined browser name and version

getOperatingSystem() 공개 메소드

Get the operating system name
public getOperatingSystem ( ) : string
리턴 string the operating system name

getUserAgentString() 공개 메소드

Get the user agent string
public getUserAgentString ( ) : string
리턴 string the user agent string

isUnknown() 공개 메소드

Tell whether this user agent is unknown or not
public isUnknown ( ) : boolean
리턴 boolean true if this user agent is unknown, false otherwise

setBrowserName() 공개 메소드

Set the browser name
public setBrowserName ( string $name )
$name string the browser name

setBrowserVersion() 공개 메소드

Set the browser version
public setBrowserVersion ( string $version )
$version string the browser version

setEngine() 공개 메소드

Set the engine name
public setEngine ( $engine )

setOperatingSystem() 공개 메소드

Set the operating system name
public setOperatingSystem ( string $operatingSystem )
$operatingSystem string the operating system name

setUserAgentString() 공개 메소드

Set the user agent string
public setUserAgentString ( string $userAgentString )
$userAgentString string the user agent string

toArray() 공개 메소드

Convert the user agent to a data array
public toArray ( ) : array
리턴 array data

프로퍼티 상세

$browserName 보호되어 있는 프로퍼티

protected $browserName

$browserVersion 보호되어 있는 프로퍼티

protected $browserVersion

$engine 보호되어 있는 프로퍼티

protected $engine

$operatingSystem 보호되어 있는 프로퍼티

protected $operatingSystem

$userAgentString 보호되어 있는 프로퍼티

protected $userAgentString