TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Utility\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

◆ getBrowserInfo()

static TYPO3\CMS\Core\Utility\ClientUtility::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, and TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction().

Referenced by TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\analyzeUserAgentStrings(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\checkGeckoVersion(), TYPO3\CMS\Rtehtmlarea\Form\Element\RichTextElement\clientInfo(), TYPO3\CMS\Core\Error\DebugExceptionHandler\echoExceptionWeb(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfFirefox(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfKonqueror(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnAndroid(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnIphone(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfOpera(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfSafari(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfAndroid(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfChromeOs(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfFreebsd(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpad(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIphone(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpod(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfLinux(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfMacOsX(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfNetbsd(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfOpenbsd(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfSolaris(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2k(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2kServicePack1(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows7(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8rev1(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsNt(), TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsVista(), and TYPO3\CMS\Core\Tests\Unit\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsXp().

◆ getDeviceType()

static TYPO3\CMS\Core\Utility\ClientUtility::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, and TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction().

◆ getVersion()

static TYPO3\CMS\Core\Utility\ClientUtility::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 float Returns double value, eg. "7.32

Definition at line 178 of file ClientUtility.php.

Referenced by TYPO3\CMS\Rtehtmlarea\Form\Element\RichTextElement\clientInfo().