PHP 클래스 browser, kirby

파일 보기 프로젝트 열기: bastianallgeier/kirby 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$engine string The readable browser engine name For example: "webkit"
$ios boolean True or false if it is an iOS device or not
$iphone boolean True or false if it is an iPhone or not
$mobile boolean True or false if it is a mobile device or not
$name string The readable name of the browser For example: "ie"
$platform string The platform name For example: "mac"
$ua string The entire user agent string
$version string The browser version number For example: "3.6"

공개 메소드들

메소드 설명
css ( string $ua = null, boolean $array = false ) : mixed Returns a browser-specific css selector string
detect ( string $ua = null ) : array The core detection method, which parses the user agent string
engine ( string $ua = null ) : string Returns the browser engine
ios ( string $ua = null ) : boolean Checks if the user agent string is from an iOS device
iphone ( string $ua = null ) : boolean Checks if the user agent string is from an iPhone
mobile ( string $ua = null ) : boolean Checks if the user agent string is from a mobile device
name ( string $ua = null ) : string Returns the name of the browser
platform ( string $ua = null ) : string Returns the platform
version ( string $ua = null ) : string Returns the browser version

메소드 상세

css() 정적인 공개 메소드

Returns a browser-specific css selector string
static public css ( string $ua = null, boolean $array = false ) : mixed
$ua string The user agent string
$array boolean True: return an array, false: return a string
리턴 mixed

detect() 정적인 공개 메소드

The core detection method, which parses the user agent string
static public detect ( string $ua = null ) : array
$ua string The user agent string
리턴 array An array with all parsed info

engine() 정적인 공개 메소드

Returns the browser engine
static public engine ( string $ua = null ) : string
$ua string The user agent string
리턴 string The browser engine

ios() 정적인 공개 메소드

Checks if the user agent string is from an iOS device
static public ios ( string $ua = null ) : boolean
$ua string The user agent string
리턴 boolean True: iOS device, false: not an iOS device

iphone() 정적인 공개 메소드

Checks if the user agent string is from an iPhone
static public iphone ( string $ua = null ) : boolean
$ua string The user agent string
리턴 boolean True: iPhone, false: not an iPhone

mobile() 정적인 공개 메소드

Checks if the user agent string is from a mobile device
static public mobile ( string $ua = null ) : boolean
$ua string The user agent string
리턴 boolean True: mobile device, false: not a mobile device

name() 정적인 공개 메소드

Returns the name of the browser
static public name ( string $ua = null ) : string
$ua string The user agent string
리턴 string The browser name

platform() 정적인 공개 메소드

Returns the platform
static public platform ( string $ua = null ) : string
$ua string The user agent string
리턴 string The platform name

version() 정적인 공개 메소드

Returns the browser version
static public version ( string $ua = null ) : string
$ua string The user agent string
리턴 string The browser version

프로퍼티 상세

$engine 공개적으로 정적으로 프로퍼티

The readable browser engine name For example: "webkit"
public static string $engine
리턴 string

$ios 공개적으로 정적으로 프로퍼티

True or false if it is an iOS device or not
public static bool $ios
리턴 boolean

$iphone 공개적으로 정적으로 프로퍼티

True or false if it is an iPhone or not
public static bool $iphone
리턴 boolean

$mobile 공개적으로 정적으로 프로퍼티

True or false if it is a mobile device or not
public static bool $mobile
리턴 boolean

$name 공개적으로 정적으로 프로퍼티

The readable name of the browser For example: "ie"
public static string $name
리턴 string

$platform 공개적으로 정적으로 프로퍼티

The platform name For example: "mac"
public static string $platform
리턴 string

$ua 공개적으로 정적으로 프로퍼티

The entire user agent string
public static string $ua
리턴 string

$version 공개적으로 정적으로 프로퍼티

The browser version number For example: "3.6"
public static string $version
리턴 string