Class Ua
A service to detect user OS, browser and device name and version
- Wei\Base
-
Wei\Ua
public
|
|
public
boolean
|
|
public
boolean
|
|
public
string
|
|
public
boolean
|
|
public
boolean
|
__get(),
getOption(),
setOption()
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
protected
array
|
$patterns
|
#
array(
// Browser
'ie' => 'MSIE ([\w.]+)',
'chrome' => 'Chrome\/([\w.]+)',
'firefox' => 'Firefox\/([\w.]+)',
// OS
'ios' => 'iP(?:hone|ad).*OS ([\d_]+)', // Contains iPod
'android' => 'Android ([\w.]+)',
'windowsphone' => 'Windows Phone (?:OS )?([\w.]+)',
// Device (Mobile & Tablet)
'iphone' => 'iPhone OS ([\d_]+)',
'ipad' => 'iPad.*OS ([\d_]+)',
// App
'wechat' => 'MicroMessenger',
)
|
protected
string
|
$versions
The versions of detected os |
#
array()
|
protected
string
|
$userAgent
The user agent string from request header |
|
protected
array
|
$server
The server and execution environment parameters, equals to $_SERVER on default |
$providers,
$wei
|