Private Class USER_AGENT_PARSER

Description

Creates a USER_AGENT_PROPERTIES object from a string.
  • version 3.2.0
  • since 2.7.0

Used by the BROWSER to generate a set of properties from the user agents passed in by PHP.

Located in /lib/main/webcore/util/browser.php (line 698)

Method Summary

Methods

Constructor __construct (line 703)

public USER_AGENT_PARSER __construct (USER_AGENT_PARSE_TABLES $tables)

Method make_properties_from (line 708)

public void make_properties_from (mixed $s)

  • mixed $s

Protected Method _contains (line 947)

protected bool _contains (string $haystack, string $needle)

  • string $haystack
  • string $needle

Protected Method _determine_gecko_date (line 854)

Read the gecko publication date from the version number.

protected DATE_TIME _determine_gecko_date (string $version)

  • string $version

Protected Method _determine_os (line 873)

Determine the operating system.

Since most user agents don't specify an OS with version (Linux is a standout here), we examine the user agent in a non version-specific way.

protected void _determine_os (USER_AGENT_PROPERTIES $props, string $raw_data)

Protected Method _determine_robot (line 926)

Check if the client is a search engine or robot.

Only checks if the $renderer_id has not already been set.

protected void _determine_robot (USER_AGENT_PROPERTIES $props)

Protected Method _extract_version (line 838)

Pull out the version from the given string.

protected true _extract_version (string $version)

  • string $version