Back to Browser class

Method identifyBrowserVersion

protected void
identifyBrowserVersion
()
Set browser version, not by engine version Fallback to use when no other method identify the engine version
Returns
  • void
Since
  • 1.7.0
Class: Browser
Project: Joomla

Method identifyBrowserVersion - Source code

/**
 * Set browser version, not by engine version
 * Fallback to use when no other method identify the engine version
 *
 * @return  void
 *
 * @since   1.7.0
 */
protected function identifyBrowserVersion()
{
    if (preg_match('|Version[/ ]([0-9.]+)|', $this->agent, $version)) {
        list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
        return;
    }
    // Can't identify browser version
    $this->majorVersion = 0;
    $this->minorVersion = 0;
}