JWebClient

Class to model a Web Client.

package

Joomla.Platform

subpackage

Application

since

11.3

Methods

__construct

Class constructor.

__construct(mixed $userAgent = null, mixed $acceptEncoding = null, mixed $acceptLanguage = null) 
since

11.3

Arguments

$userAgent

mixedThe optional user-agent string to parse.

$acceptEncoding

mixedThe optional client accept encoding string to parse.

$acceptLanguage

mixedThe optional client accept language string to parse.

__get

Magic method to get an object property's value by name.

__get(string $name) : mixed
since

11.3

Arguments

$name

stringName of the property for which to return a value.

Response

mixedThe requested value if it exists.

detectBrowser

Detects the client browser and version in a user agent string.

detectBrowser(string $userAgent) : void
since

11.3

Arguments

$userAgent

stringThe user-agent string to parse.

detectEncoding

Method to detect the accepted response encoding by the client.

detectEncoding(string $acceptEncoding) : void
since

11.3

Arguments

$acceptEncoding

stringThe client accept encoding string to parse.

detectEngine

Detects the client rendering engine in a user agent string.

detectEngine(string $userAgent) : void
since

11.3

Arguments

$userAgent

stringThe user-agent string to parse.

detectLanguage

Method to detect the accepted languages by the client.

detectLanguage(mixed $acceptLanguage) : void
since

11.3

Arguments

$acceptLanguage

mixedThe client accept language string to parse.

detectPlatform

Detects the client platform in a user agent string.

detectPlatform(string $userAgent) : void
since

11.3

Arguments

$userAgent

stringThe user-agent string to parse.

Constants

WINDOWS

WINDOWS_PHONE

WINDOWS_CE

IPHONE

IPAD

IPOD

MAC

BLACKBERRY

ANDROID

LINUX

TRIDENT

WEBKIT

GECKO

PRESTO

KHTML

AMAYA

IE

FIREFOX

CHROME

SAFARI

OPERA

Properties

platform

The detected platform on which the web client runs.

since

11.3

Type(s)

integer

mobile

True if the web client is a mobile device.

since

11.3

Type(s)

boolean

engine

The detected rendering engine used by the web client.

since

11.3

Type(s)

integer

browser

The detected browser used by the web client.

since

11.3

Type(s)

integer

browserVersion

The detected browser version used by the web client.

since

11.3

Type(s)

string

languages

The priority order detected accepted languages for the client.

since

11.3

Type(s)

array

encodings

The priority order detected accepted encodings for the client.

since

11.3

Type(s)

array

userAgent

The web client's user agent string.

since

11.3

Type(s)

string

acceptEncoding

The web client's accepted encoding string.

since

11.3

Type(s)

string

acceptLanguage

The web client's accepted languages string.

since

11.3

Type(s)

string

detection

An array of flags determining whether or not a detection routine has been run.

since

11.3

Type(s)

array