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)
Set this property with load_from_server() or load_from_string().
public string $user_agent_string
The most likely operating system derived from the user agent string.
public string calculated_system_name ()
public string description_as_plain_text ()
Performs a reverse name lookup of the ip_address().
public string domain ()
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 ()
Use this location with CONTEXT::icon_as_html() to render the icon in a WebCore application.
public string icon_name ()
Will resolve the proxy forward, if one is present in the HTTP header.
public string ip_address ()
public boolean is (string $code)
Called automatically from the constructor.
public void load_from_server ()
Used primarily for testing.
public void load_from_string (mixed $s)
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 ()
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 ()
This is the number used internall to identify whether a feature is supported.
public string renderer_version ()
public boolean supports (integer $code)
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 ()
This is specific, like Windows NT 5.1 (Windows 2000) will return 5.1, not 2000.
public string system_version ()
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 ()
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 ()