BROWSER
The class reads the values from the current session, by default, but can be loaded using load_from_string(). Use supports() and is() to determine the capabilities of the underlying renderer.
The user agent detection mechanism makes a distinction between the name of the browser and the technology used to render content. The browser name (e. g. MSN) is available through name() and version(), while the underlying renderer (e.g. IE 6.0) is available through (renderer_name() and renderer_version()). Use system_id() to get a formatted operating system name or system_name() and system_version() to access the information directly.
Located in /lib/main/webcore/util/browser.php (line 203)
#
public
string
$user_agent_string
#
public
BROWSER
__construct
()
#
public
string
calculated_system_name
()
#
public
string
description_as_html
()
#
public
string
description_as_plain_text
()
#
public
string
domain
()
#
public
DATE_TIME
gecko_date
()
#
public
string
icon_name
()
#
public
string
ip_address
()
#
public
boolean
is
(string $code)
#
public
void
load_from_server
()
#
public
void
load_from_string
(mixed $s)
#
public
string
name
()
#
public
string
renderer_name
()
#
public
string
renderer_version
()
#
public
boolean
supports
(integer $code)
#
public
string
system_id
()
#
public
string
system_name
()
#
public
string
system_version
()
#
public
string
version
()
#
protected
string
_description_as_text
([boolean $text_only = false])
#
protected
USER_AGENT_PARSER
_make_user_agent_parser
(mixed $tables)
#
protected
USER_AGENT_PARSE_TABLES
_make_user_agent_parse_tables
()
$user_agent_string
(line 210)
Set this property with load_from_server() or load_from_string().
public string $user_agent_string
calculated_system_name
(line 412)
The most likely operating system derived from the user agent string.
public string calculated_system_name ()
description_as_plain_text
(line 288)
public string description_as_plain_text ()
domain
(line 248)
Performs a reverse name lookup of the ip_address().
public string domain ()
gecko_date
(line 453)
Gecko is the mozilla browser technology. Conforming user agent strings include the build date of the Gecko component. (Can be empty)
public DATE_TIME gecko_date ()
icon_name
(line 344)
Use this location with CONTEXT::icon_as_html() to render the icon in a WebCore application.
public string icon_name ()
ip_address
(line 259)
Will resolve the proxy forward, if one is present in the HTTP header.
public string ip_address ()
is
(line 465)
public boolean is (string $code)
load_from_server
(line 225)
Called automatically from the constructor.
public void load_from_server ()
load_from_string
(line 235)
Used primarily for testing.
public void load_from_string (mixed $s)
name
(line 321)
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.
public string name ()
renderer_name
(line 299)
This is often different than the name, since many browsers employ embedded renderers like Gecko, or are rebranded like Opera Composer browsers.
public string renderer_name ()
renderer_version
(line 310)
This is the number used internall to identify whether a feature is supported.
public string renderer_version ()
supports
(line 477)
public boolean supports (integer $code)
system_id
(line 428)
Returns as much information about the operating system as possible, favoring the interpreted system name because it's generally capitalized better.
public string system_id ()
system_version
(line 402)
This is specific, like Windows NT 5.1 (Windows 2000) will return 5.1, not 2000.
public string system_version ()
version
(line 333)
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'.
public string version ()
_description_as_text
(line 543)
protected string _description_as_text ([boolean $text_only = false])
_make_user_agent_parser
(line 588)
protected USER_AGENT_PARSER _make_user_agent_parser (mixed $tables)
_make_user_agent_parse_tables
(line 579)
protected USER_AGENT_PARSE_TABLES _make_user_agent_parse_tables ()