Class BROWSER

Description

Identifies the browser for this session.

Identifies as much as possible of the browser name and version, OS name and version, and the renderer name and version. The renderer is then used to determine which capabilites are supported.

Located in Program_Root/browser.php (line 98)



	

			
Variable Summary
 string $user_agent_string
 integer $_build_number
 string $_interpreted_system_name
 integer $_major_version
 integer $_minor_version
 string $_name
 string $_normalized_ua
 string $_os_id
 string $_renderer_id
 string $_renderer_name
 string $_renderer_version
 string $_system_name
 string $_system_version
 string $_version
Method Summary
 void BROWSER ()
 string domain ()
 DATE_TIME gecko_date ()
 string interpreted_system_name ()
 string ip_address ()
 bool is (integer $code)
 string name ()
 string renderer_name ()
 string renderer_version ()
 bool supports (integer $code)
 string system_id ()
 string system_name ()
 string system_version ()
 string version ()
 bool _contains (string $haystack, string $needle)
 void _ensure_loaded ()
 array &_ignored_ids ()
 array &_os_ids ()
 array &_renderer_ids ()
 array &_system_ids ()
Variables
string $user_agent_string (line 102)

User-agent string received in HTTP request.

  • var: string
integer $_build_number (line 577)
  • var: integer
  • access: private
string $_interpreted_system_name (line 567)
  • var: string
  • access: private
integer $_major_version (line 575)
  • var: integer
  • access: private
integer $_minor_version (line 576)
  • var: integer
  • access: private
string $_name (line 560)
  • var: string
  • access: private
string $_normalized_ua (line 583)

Lowercase version of the user agent string.

  • var: string
  • access: private
string $_os_id (line 568)
  • var: string
  • access: private
string $_renderer_id (line 564)
  • var: string
  • access: private
string $_renderer_name (line 562)
  • var: string
  • access: private
string $_renderer_version (line 563)
  • var: string
  • access: private
string $_system_name (line 565)
  • var: string
  • access: private
string $_system_version (line 566)
  • var: string
  • access: private
string $_version (line 561)
  • var: string
  • access: private
Methods
Constructor BROWSER (line 104)
void BROWSER ()
domain (line 272)

Resolve the domain name of the browser.

  • return: string
string domain ()
gecko_date (line 202)

Build date of the browser, if built with Gecko.

Gecko is the mozilla browser technology. Conforming user agent strings include the build date of the Gecko component. (Can be empty)

  • return: DATE_TIME
DATE_TIME gecko_date ()
interpreted_system_name (line 171)

Calculated system name.

The most likely operating system derived from the user agent string.

  • return: string
string interpreted_system_name ()
ip_address (line 280)

Return actual ip address of browser (resolves proxies).

  • return: string
string ip_address ()
is (line 212)

Does the browser use this renderer or run on this operating system?.

See the browser renderer/OS constants.

  • return: bool
bool is (integer $code)
  • integer $code
name (line 134)

Name of the browser.

Not necessarily the same as the renderer name. AOL uses the IE engine or the Gecko engine, depending on version. MSN uses the IE engine.

  • return: string
string name ()
renderer_name (line 114)

Identifies the technology used by this browser.

This is often different than the name, since many browsers employ embedded renderers like Gecko, or are rebranded like Opera Composer browsers.

  • return: string
string renderer_name ()
renderer_version (line 124)

Identifies the version of the technology used by this browser.

This is the number used internall to identify whether a feature is supported.

string renderer_version ()
supports (line 222)

Is the requested functionality supported?.

See the browser functionality constants.

  • return: bool
bool supports (integer $code)
  • integer $code
system_id (line 182)

Fully formatted operating system id.

Returns as much information about the operating system as possible.

  • return: string
string system_id ()
system_name (line 153)

Specific name of the operating system.

  • return: string
string system_name ()
system_version (line 162)

Operating system version.

This is specific, like Windows NT 5.1 (Windows 2000) will return 5.1, not 2000.

  • return: string
string system_version ()
version (line 145)

Version of the browser.

Not necessarily the same as the renderer version. Largely useless identifier for determining feature support, but nice to use when showing a user which browser they are running. e.g. displaying 'MSN 7.0' instead of 'IE 5.5sp1'.

  • return: string
string version ()
_contains (line 434)
  • return: bool
  • access: private
bool _contains (string $haystack, string $needle)
  • string $haystack
  • string $needle
_ensure_loaded (line 294)

Determine browser name, technology, operating system and versions.

Called from the attribute access functions to make sure the user agent has been parsed.

  • access: private
void _ensure_loaded ()
_ignored_ids (line 467)

A list of ids known to be spurious or system ids.

The algorithm always uses the last non-ignored id as the browser id; this list determines which ids are ignored.

  • return: array
  • access: private
array &_ignored_ids ()
_os_ids (line 510)

A mapping of user agent fragments to platform ids.

The platform id is a nicely formatted, standardized name for the operating system. This array maps the different user agent platform ids onto these standard ones. (e.g. 'nt 4' and 'nt4' both map onto 'Windows NT 4.x').

  • return: array
  • access: private
array &_os_ids ()
_renderer_ids (line 448)

A list of the known rendering technologies.

Each id maps to the rendering technology to record (retrieved later with the 'is' function), a pretty-printed name for the renderer and a level. The level determines which renderers override others if more than one renderer is specified. That is, almost every user-agent on the planet returns mozilla x.x, but that renderer declaration is overridden by any other one that comes along. IE is the next weakest because many user agents spoof as IE as well. If either or both of these are specified, they are recorded, but if any other renderer is specified, that one is used instead.

  • return: array
  • access: private
array &_renderer_ids ()
_system_ids (line 494)

A list of systems known to provide version info in the user agent.

  • return: array
  • access: private
array &_system_ids ()

Documention generated on Sun, 23 Feb 2003 12:34:41 +0100 by phpDocumentor 1.2.0rc1