PHP 클래스 Jenssegers\Agent\Agent

상속: extends Mobile_Detec\Mobile_Detect
파일 보기 프로젝트 열기: jenssegers/agent 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$additionalBrowsers array Note: 'Vivaldi' must be above Chrome, otherwise it'll fail
$additionalDevices array List of desktop devices.
$additionalOperatingSystems array List of additional operating systems.
$additionalProperties array List of additional properties.
$robots array List of robots.

공개 메소드들

메소드 설명
__call ( $name, $arguments ) Changing detection type to extended.
browser ( $userAgent = null ) : string Get the browser name.
device ( string $userAgent = null ) : string Get the device name.
getDetectionRulesExtended ( ) : array Get all detection rules. These rules include the additional platforms and browsers.
getRules ( ) : array Retrieve the current set of rules.
isDesktop ( string $userAgent = null, array $httpHeaders = null ) : boolean Check if the device is a desktop computer.
isPhone ( string $userAgent = null, array $httpHeaders = null ) : boolean Check if the device is a mobile phone.
isRobot ( string $userAgent = null ) : boolean Check if device is a robot.
languages ( $acceptLanguage = null ) : array Get accept languages.
platform ( string $userAgent = null ) : string Get the platform name.
robot ( string $userAgent = null ) : string Get the robot name.
version ( $propertyName, $type = self::VERSION_TYPE_STRING ) Check the version of the given property in the User-Agent.

보호된 메소드들

메소드 설명
findDetectionRulesAgainstUA ( array $rules, null $userAgent = null ) : string Match a detection rule and return the matched key.
mergeRules ( ) : array Merge multiple rules into one array.

메소드 상세

__call() 공개 메소드

Changing detection type to extended.
public __call ( $name, $arguments )

browser() 공개 메소드

Get the browser name.
public browser ( $userAgent = null ) : string
리턴 string

device() 공개 메소드

Get the device name.
public device ( string $userAgent = null ) : string
$userAgent string
리턴 string

findDetectionRulesAgainstUA() 보호된 메소드

Match a detection rule and return the matched key.
protected findDetectionRulesAgainstUA ( array $rules, null $userAgent = null ) : string
$rules array
$userAgent null
리턴 string

getDetectionRulesExtended() 공개 메소드

Get all detection rules. These rules include the additional platforms and browsers.
public getDetectionRulesExtended ( ) : array
리턴 array

getRules() 공개 메소드

Retrieve the current set of rules.
public getRules ( ) : array
리턴 array

isDesktop() 공개 메소드

Check if the device is a desktop computer.
public isDesktop ( string $userAgent = null, array $httpHeaders = null ) : boolean
$userAgent string deprecated
$httpHeaders array deprecated
리턴 boolean

isPhone() 공개 메소드

Check if the device is a mobile phone.
public isPhone ( string $userAgent = null, array $httpHeaders = null ) : boolean
$userAgent string deprecated
$httpHeaders array deprecated
리턴 boolean

isRobot() 공개 메소드

Check if device is a robot.
public isRobot ( string $userAgent = null ) : boolean
$userAgent string
리턴 boolean

languages() 공개 메소드

Get accept languages.
public languages ( $acceptLanguage = null ) : array
리턴 array

mergeRules() 보호된 메소드

Merge multiple rules into one array.
protected mergeRules ( ) : array
리턴 array

platform() 공개 메소드

Get the platform name.
public platform ( string $userAgent = null ) : string
$userAgent string
리턴 string

robot() 공개 메소드

Get the robot name.
public robot ( string $userAgent = null ) : string
$userAgent string
리턴 string

version() 공개 메소드

Check the version of the given property in the User-Agent.
public version ( $propertyName, $type = self::VERSION_TYPE_STRING )

프로퍼티 상세

$additionalBrowsers 보호되어 있는 정적으로 프로퍼티

Note: 'Vivaldi' must be above Chrome, otherwise it'll fail
protected static array $additionalBrowsers
리턴 array

$additionalDevices 보호되어 있는 정적으로 프로퍼티

List of desktop devices.
protected static array $additionalDevices
리턴 array

$additionalOperatingSystems 보호되어 있는 정적으로 프로퍼티

List of additional operating systems.
protected static array $additionalOperatingSystems
리턴 array

$additionalProperties 보호되어 있는 정적으로 프로퍼티

List of additional properties.
protected static array $additionalProperties
리턴 array

$robots 보호되어 있는 정적으로 프로퍼티

List of robots.
protected static array $robots
리턴 array