Browser::checkBrowserMozilla PHP Method

checkBrowserMozilla() protected method

Determine if the browser is Mozilla or not (last updated 1.7)
protected checkBrowserMozilla ( ) : boolean
return boolean True if the browser is Mozilla otherwise false
    protected function checkBrowserMozilla()
    {
        if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9].[0-9][a-b]?/i', $this->_agent) && stripos($this->_agent, 'netscape') === false) {
            $aversion = explode(' ', stristr($this->_agent, 'rv:'));
            preg_match('/rv:[0-9].[0-9][a-b]?/i', $this->_agent, $aversion);
            $this->setVersion(str_replace('rv:', '', $aversion[0]));
            $this->setBrowser(self::BROWSER_MOZILLA);
            return true;
        } else {
            if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9]\\.[0-9]/i', $this->_agent) && stripos($this->_agent, 'netscape') === false) {
                $aversion = explode('', stristr($this->_agent, 'rv:'));
                $this->setVersion(str_replace('rv:', '', $aversion[0]));
                $this->setBrowser(self::BROWSER_MOZILLA);
                return true;
            } else {
                if (stripos($this->_agent, 'mozilla') !== false && preg_match('/mozilla\\/([^ ]*)/i', $this->_agent, $matches) && stripos($this->_agent, 'netscape') === false) {
                    $this->setVersion($matches[1]);
                    $this->setBrowser(self::BROWSER_MOZILLA);
                    return true;
                }
            }
        }
        return false;
    }