NukeViet\Client\Browser::checkBrowserW3CValidator PHP Метод

checkBrowserW3CValidator() защищенный Метод

Determine if the browser is the W3C Validator or not (last updated 1.7)
protected checkBrowserW3CValidator ( ) : boolean
Результат boolean True if the browser is the W3C Validator otherwise false
    protected function checkBrowserW3CValidator()
    {
        if (stripos($this->_agent, 'W3C-checklink') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'W3C-checklink'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                $this->setVersion($aversion[0]);
                $this->_browser_name = self::BROWSER_W3CVALIDATOR_NAME;
                $this->_browser_key = self::BROWSER_W3CVALIDATOR;
                return true;
            }
        } elseif (stripos($this->_agent, 'W3C_Validator') !== false) {
            // Some of the Validator versions do not delineate w/ a slash - add it back in
            $ua = str_replace("W3C_Validator ", "W3C_Validator/", $this->_agent);
            $aresult = explode('/', stristr($ua, 'W3C_Validator'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                $this->setVersion($aversion[0]);
                $this->_browser_name = self::BROWSER_W3CVALIDATOR_NAME;
                $this->_browser_key = self::BROWSER_W3CVALIDATOR;
                return true;
            }
        } elseif (stripos($this->_agent, 'W3C-mobileOK') !== false) {
            $this->_browser_name = self::BROWSER_W3CVALIDATOR_NAME;
            $this->_browser_key = self::BROWSER_W3CVALIDATOR;
            $this->setMobile(true);
            return true;
        }
        return false;
    }