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

Value 1

Type(s)

WINDOWS_PHONE

Value 2

Type(s)

WINDOWS_CE

Value 3

Type(s)

IPHONE

Value 4

Type(s)

IPAD

Value 5

Type(s)

IPOD

Value 6

Type(s)

MAC

Value 7

Type(s)

BLACKBERRY

Value 8

Type(s)

ANDROID

Value 9

Type(s)

LINUX

Value 10

Type(s)

TRIDENT

Value 11

Type(s)

WEBKIT

Value 12

Type(s)

GECKO

Value 13

Type(s)

PRESTO

Value 14

Type(s)

KHTML

Value 15

Type(s)

AMAYA

Value 16

Type(s)

IE

Value 17

Type(s)

FIREFOX

Value 18

Type(s)

CHROME

Value 19

Type(s)

SAFARI

Value 20

Type(s)

OPERA

Value 21

Type(s)

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