\Quark\UtilsUserAgent

UserAgent class

Summary

Methods
Properties
Constants
__construct()
getBrowser()
getEngine()
getOperatingSystem()
getDevice()
getBot()
isOldBrowser()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
parseProperty()
$userAgent
$headers
$parser
N/A

Properties

$userAgent

$userAgent : string

Type

string — User agent.

$headers

$headers : array

Type

array — Headers.

$parser

$parser : \WhichBrowser\Parser

Type

\WhichBrowser\Parser — Parser.

Methods

__construct()

__construct(string  $userAgent = null, array  $headers = null) 

Creates an instance of UserAgent.

Parameters

string $userAgent

User agent.

array $headers

Headers.

getBrowser()

getBrowser() : array

Get browser informations.

Returns

array —

Browser informations.

getEngine()

getEngine() : array

Get engine informations.

Returns

array —

Engine informations.

getOperatingSystem()

getOperatingSystem() : array

Get operating system informations.

Returns

array —

Operating system informations.

getDevice()

getDevice() : array

Get device informations.

Returns

array —

Device informations.

getBot()

getBot() : array

Get bot informations.

Returns

array —

Bot informations.

isOldBrowser()

isOldBrowser() : boolean

Check old browsers.

Returns

boolean —

True if a browser is old, false otherwise.

parseProperty()

parseProperty(mixed  $value) : mixed

Parse property value.

Parameters

mixed $value

Returns

mixed —

Parsed value.