Open Sencillo  2015.107
Long live the simplicity of PHP
 All Data Structures Namespaces Functions Pages
UserAgentParser Class Reference

Static Public Member Functions

static getOperatingSystem ($userAgent)
 
static getBrowser ($userAgent)
 
static getBrowserNameFromId ($browserId)
 
static getBrowserShortNameFromId ($browserId)
 
static getBrowserFamilyFromId ($browserId)
 
static getOperatingSystemNameFromId ($osId)
 
static getOperatingSystemShortNameFromId ($osId)
 
static getOperatingSystemIdFromName ($osName)
 
static getOperatingSystemFamilyFromId ($osId)
 

Static Protected Member Functions

static cleanupUserAgent ($userAgent)
 
static init ()
 

Static Protected Attributes

static $browsers
 
static $browserType
 
static $safariVersions
 
static $omniWebVersions
 
static $operatingSystems
 
static $osType
 
static $browserIdToName
 
static $browserIdToShortName
 
static $operatingSystemsIdToName
 
static $operatingSystemsIdToShortName
 

Detailed Description

Definition at line 60 of file userAgent.parser.usagpa.php.

Member Function Documentation

static getBrowser (   $userAgent)
static

Returns the browser information array, given a user agent string.

Parameters
string$userAgent
Returns
array false if the browser is "unknown", or array( 'id' => '', // 2 letters ID, eg. FF 'name' => '', // 2 letters ID, eg. FF 'short_name' => '', // 2 letters ID, eg. FF 'major_number' => '', // 2 in firefox 2.0.12 'minor_number' => '', // 0 in firefox 2.0.12 'version' => '', // major_number.minor_number );
See Also
self::$browsers for the list of OS

Definition at line 361 of file userAgent.parser.usagpa.php.

static getOperatingSystem (   $userAgent)
static

Returns an array of the OS for the submitted user agent 'id' => '', 'name' => '', 'short_name' => '',

Parameters
string$userAgent
Returns
string false if OS couldn't be identified, or 3 letters ID (eg. WXP)
See Also
UserAgentParser/OperatingSystems.php for the list of OS (also available in self::$operatingSystems)

Definition at line 320 of file userAgent.parser.usagpa.php.

Field Documentation

$browserType
staticprotected
Initial value:
= array(
'ie' => array('IE'),
'gecko' => array('NS', 'PX', 'FF', 'FB', 'CA', 'GA', 'KM', 'MO', 'SM', 'CO', 'FE', 'KP', 'KZ', 'TB'),
'khtml' => array('KO'),
'webkit' => array('SF', 'CH', 'OW', 'AR', 'EP', 'FL', 'WO', 'AB', 'IR', 'CS', 'FD', 'HA', 'MI', 'GE', 'DF', 'BB', 'BP', 'TI', 'CF', 'RK', 'B2', 'NF'),
'opera' => array('OP'),
)

Definition at line 153 of file userAgent.parser.usagpa.php.

$omniWebVersions
staticprotected
Initial value:
= array(
'622.15' => array('5', '11'),
'622.10' => array('5', '10'),
'622.8' => array('5', '9'),
'622.3' => array('5', '8'),
'621' => array('5', '7'),
'613' => array('5', '6'),
'607' => array('5', '5'),
'563.34' => array('5', '1'),
'558.36' => array('5', '0'),
'496' => array('4', '5'),
)

Definition at line 179 of file userAgent.parser.usagpa.php.

$osType
staticprotected
Initial value:
= array(
'Windows' => array('WI8', 'WI7', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95'),
'Linux' => array('LIN'),
'Mac' => array('MAC'),
'iOS' => array('IPD', 'IPA', 'IPH'),
'Android' => array('AND'),
'Windows Mobile' => array('WPH', 'WMO', 'WCE'),
'Gaming Console' => array('WII', 'WIU', 'PS3', 'XBX'),
'Mobile Gaming Console' => array('PSP', 'PSV', 'NDS', 'DSI', '3DS'),
'Unix' => array('SOS', 'AIX', 'HP-UX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64'),
'Other Mobile' => array('MAE', 'WOS', 'POS', 'BLB', 'QNX', 'SYM', 'SBA'),
'Other' => array('VMS', 'OS2', 'BEOS', 'AMI')
)

Definition at line 292 of file userAgent.parser.usagpa.php.

$safariVersions
staticprotected
Initial value:
= array(
'536.25' => array('6', '0'),
'534.48' => array('5', '1'),
'533.16' => array('5', '0'),
'533.4' => array('4', '1'),
'526.11.2' => array('4', '0'),
'525.26' => array('3', '2'),
'525.13' => array('3', '1'),
'522.11' => array('3', '0'),
'412' => array('2', '0'),
'312' => array('1', '3'),
'125' => array('1', '2'),
'100' => array('1', '1'),
'85' => array('1', '0'),
'73' => array('0', '9'),
'48' => array('0', '8'),
)

Definition at line 161 of file userAgent.parser.usagpa.php.


The documentation for this class was generated from the following file: