CI_User_agent::_set_browser PHP Method

_set_browser() protected method

Set the Browser
protected _set_browser ( ) : boolean
return boolean
    protected function _set_browser()
    {
        if (is_array($this->browsers) && count($this->browsers) > 0) {
            foreach ($this->browsers as $key => $val) {
                if (preg_match('|' . $key . '.*?([0-9\\.]+)|i', $this->agent, $match)) {
                    $this->is_browser = TRUE;
                    $this->version = $match[1];
                    $this->browser = $val;
                    $this->_set_mobile();
                    return TRUE;
                }
            }
        }
        return FALSE;
    }