TYPO3  7.6
Static Public Member Functions | List of all members
ClientUtility Class Reference

Static Public Member Functions

static getBrowserInfo ($userAgent)
 
static getVersion ($version)
 
static getDeviceType ($userAgent)
 

Detailed Description

Class to handle and determine browser specific information.

Definition at line 20 of file ClientUtility.php.

Member Function Documentation

static getBrowserInfo (   $userAgent)
static

Generates an array with abstracted browser information

Parameters
string$userAgentThe useragent string, ::getIndpEnv('HTTP_USER_AGENT')
Returns
array Contains keys "browser", "version", "system

Definition at line 28 of file ClientUtility.php.

References $GLOBALS, GeneralUtility\callUserFunction(), and elseif.

static getDeviceType (   $userAgent)
static

Gets a code for a browsing device based on the input useragent string.

Parameters
string$userAgentThe useragent string, ::getIndpEnv('HTTP_USER_AGENT')
Returns
string Code for the specific device type

Definition at line 189 of file ClientUtility.php.

References $GLOBALS.

static getVersion (   $version)
static

Returns the version of a browser; Basically getting doubleval() of the input string, stripping of any non-numeric values in the beginning of the string first.

Parameters
string$versionA string with version number, eg. "/7.32 blablabla @return double Returns double value, eg. "7.32

Definition at line 178 of file ClientUtility.php.