Class JApplicationWebClient

Description

Class to model a Web Client.

  • property-read: integer $platform: The detected platform on which the web client runs.
  • property-read: boolean $mobile: True if the web client is a mobile device.
  • property-read: integer $engine: The detected rendering engine used by the web client.
  • property-read: integer $browser: The detected browser used by the web client.
  • property-read: string $browserVersion: The detected browser version used by the web client.
  • property-read: array $languages: The priority order detected accepted languages for the client.
  • property-read: array $encodings: The priority order detected accepted encodings for the client.
  • property-read: string $userAgent: The web client's user agent string.
  • property-read: string $acceptEncoding: The web client's accepted encoding string.
  • property-read: string $acceptLanguage: The web client's accepted languages string.
  • property-read: array $detection: An array of flags determining whether or not a detection routine has been run.
  • property-read: boolean $robot: True if the web client is a robot
  • since: 12.1

Located in /libraries/joomla/application/web/client.php (line 32)


	
			
Direct descendents
Class Description
 class JWebClient Deprecated class placeholder. You should use JApplicationWebClient instead.
Class Constant Summary
 AMAYA = 16
 ANDROID = 9
 CHROME = 19
 FIREFOX = 18
 GECKO = 13
 IE = 17
 IPAD = 5
 IPHONE = 4
 IPOD = 6
 KHTML = 15
 LINUX = 10
 MAC = 7
 OPERA = 21
 PRESTO = 14
 SAFARI = 20
 TRIDENT = 11
 WEBKIT = 12
 WINDOWS = 1
Variable Summary
 integer $browser
 array $detection
 array $encodings
 integer $engine
 array $languages
 boolean $mobile
 integer $platform
 boolean $robot
 string $userAgent
Method Summary
 void detectBrowser (string $userAgent)
 void detectEncoding (string $acceptEncoding)
 void detectEngine (string $userAgent)
 void detectLanguage (mixed $acceptLanguage)
 void detectPlatform (string $userAgent)
 void detectRobot (string $userAgent)
 JApplicationWebClient __construct ([string $userAgent = null], [string $acceptEncoding = null], [string $acceptLanguage = null])
 mixed __get (string $name)
Variables
string $acceptEncoding (line 109)
  • var: The web client's accepted encoding string.
  • since: 12.1
  • access: protected
string $acceptLanguage (line 115)
  • var: The web client's accepted languages string.
  • since: 12.1
  • access: protected
integer $browser (line 79)
  • var: The detected browser used by the web client.
  • since: 12.1
  • access: protected
string $browserVersion (line 85)
  • var: The detected browser version used by the web client.
  • since: 12.1
  • access: protected
array $detection = array() (line 127)
  • var: An array of flags determining whether or not a detection routine has been run.
  • since: 12.1
  • access: protected
array $encodings = array() (line 97)
  • var: The priority order detected accepted encodings for the client.
  • since: 12.1
  • access: protected
integer $engine (line 73)
  • var: The detected rendering engine used by the web client.
  • since: 12.1
  • access: protected
array $languages = array() (line 91)
  • var: The priority order detected accepted languages for the client.
  • since: 12.1
  • access: protected
boolean $mobile = false (line 67)
  • var: True if the web client is a mobile device.
  • since: 12.1
  • access: protected
integer $platform (line 61)
  • var: The detected platform on which the web client runs.
  • since: 12.1
  • access: protected
boolean $robot = false (line 121)
  • var: True if the web client is a robot.
  • since: 12.3
  • access: protected
string $userAgent (line 103)
  • var: The web client's user agent string.
  • since: 12.1
  • access: protected
Methods
detectBrowser (line 245)

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

  • since: 12.1
  • access: protected
void detectBrowser (string $userAgent)
  • string $userAgent: The user-agent string to parse.
detectEncoding (line 328)

Method to detect the accepted response encoding by the client.

  • since: 12.1
  • access: protected
void detectEncoding (string $acceptEncoding)
  • string $acceptEncoding: The client accept encoding string to parse.
detectEngine (line 346)

Detects the client rendering engine in a user agent string.

  • since: 12.1
  • access: protected
void detectEngine (string $userAgent)
  • string $userAgent: The user-agent string to parse.
detectLanguage (line 392)

Method to detect the accepted languages by the client.

  • since: 12.1
  • access: protected
void detectLanguage (mixed $acceptLanguage)
  • mixed $acceptLanguage: The client accept language string to parse.
detectPlatform (line 410)

Detects the client platform in a user agent string.

  • since: 12.1
  • access: protected
void detectPlatform (string $userAgent)
  • string $userAgent: The user-agent string to parse.
detectRobot (line 503)

Determines if the browser is a robot or not.

  • since: 12.3
  • access: protected
void detectRobot (string $userAgent)
  • string $userAgent: The user-agent string to parse.
Constructor __construct (line 138)

Class constructor.

  • since: 12.1
  • access: public
JApplicationWebClient __construct ([string $userAgent = null], [string $acceptEncoding = null], [string $acceptLanguage = null])
  • string $userAgent: The optional user-agent string to parse.
  • string $acceptEncoding: The optional client accept encoding string to parse.
  • string $acceptLanguage: The optional client accept language string to parse.

Redefined in descendants as:
__get (line 180)

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

  • return: The requested value if it exists.
  • since: 12.1
  • access: public
mixed __get (string $name)
  • string $name: Name of the property for which to return a value.
Class Constants
AMAYA = 16 (line 49)
ANDROID = 9 (line 42)
ANDROIDTABLET = 22 (line 55)
BLACKBERRY = 8 (line 41)
CHROME = 19 (line 52)
FIREFOX = 18 (line 51)
GECKO = 13 (line 46)
IE = 17 (line 50)
IPAD = 5 (line 38)
IPHONE = 4 (line 37)
IPOD = 6 (line 39)
KHTML = 15 (line 48)
LINUX = 10 (line 43)
MAC = 7 (line 40)
OPERA = 21 (line 54)
PRESTO = 14 (line 47)
SAFARI = 20 (line 53)
TRIDENT = 11 (line 44)
WEBKIT = 12 (line 45)
WINDOWS = 1 (line 34)
WINDOWS_CE = 3 (line 36)
WINDOWS_PHONE = 2 (line 35)

Documentation generated on Tue, 19 Nov 2013 14:55:50 +0100 by phpDocumentor 1.4.3