Detects if the current browser is the Nokia S60 Open Source Browser.
977062
function DetectS60OssBrowser()
   {
      //First, test for WebKit, then make sure it's either Symbian or S60.
      if ($this->DetectWebkit() == $this->true)
      {
        if (stripos($this->useragent, $this->deviceSymbian) > -1 ||
            stripos($this->useragent, $this->deviceS60) > -1)
        {
           return $this->true;
        }
        else
           return $this->false; 
      }
      else
         return $this->false; 
   }
376680
def detectS60OssBrowser(self):
        
        #First, test for WebKit, then make sure it's either Symbian or S60.
        return self.detectWebkit() \
            and (UAgentInfo.deviceSymbian in self.__userAgent
                or UAgentInfo.deviceS60 in self.__userAgent)
576516
protected function checkBrowserAndroidHTCSensation()
    {
        if( stripos($this->_agent,'Android') !== false ||
        	stripos($this->_agent,'Macintosh') !== false )
        {
        	if( stripos($this->_agent,'HTC_SensationXE')  !== false ||
        		stripos($this->_agent,'HTC Sensation XE') !== false )
        	{
        	    $this->setVersion(self::VERSION_UNKNOWN);
        	    $this->setMobile(true);
        	    $this->setBrowser(self::BROWSER_HTC_SENSATION_XE);
        	    return true;
        	}
        	if( stripos($this->_agent,'HTC_SensationXL')  !== false ||
        	    stripos($this->_agent,'HTC Sensation XL') !== false ||
        	    stripos($this->_agent,'HTC_Runnymede') !== false ) //usa name
        	{
        	    $this->setVersion(self::VERSION_UNKNOWN);
        	    $this->setMobile(true);
        	    $this->setBrowser(self::BROWSER_HTC_SENSATION_XL);
        	    return true;
        	}
        	if( stripos($this->_agent,'HTC_Sensation_Z710') !== false )
        	{
        	    $this->setVersion(self::VERSION_UNKNOWN);
        	    $this->setMobile(true);
        	    $this->setBrowser(self::BROWSER_HTC_SENSATION_Z710);
        	    return true;
        	}
        	if( stripos($this->_agent,'HTC Sensation') !== false ||
        		stripos($this->_agent,'HTC_Sensation') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_SENSATION);
                return true;
            }
        }
        return false;
    }
1066196
function DetectTizen()
   {
      if ((stripos($this->useragent, $this->deviceTizen) > -1)
			&& (stripos($this->useragent, $this->mobile) > -1))
         return $this->true; 
      else
         return $this->false; 
   }
177110
function isBrowser(override) {
    // Enables checking a process.env key while
    // in Node.
    if (override)
        return typeof process !== 'undefined' &&
            function_1.tryWrap(to_1.toBoolean, process.env &&
                process.env[override])(false) === true;
    // Otherwise just return NOT Node.
    return !isNode();
}
1119854
def detect_palm_o_s()

      if (user_agent.include?(DEVICE_PALM) || user_agent.include?(ENGINE_BLAZER) || user_agent.include?(ENGINE_XIINO))

        if (detect_palm_web_o_s())
          return false
        else
          return true
        end
      end
      return false
    end
1196826
protected function checkBrowserAndroidHTCDesire()
    {
        if( stripos($this->_agent,'Android') !== false )
        {
            if( stripos($this->_agent,'HTC_DesireHD') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE_HD);
                return true;
            }
            if( stripos($this->_agent,'HTC Desire Z') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE_Z);
                return true;
            }
            if( stripos($this->_agent,'HTC_DesireS') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE_S);
                return true;
            }
            if( stripos($this->_agent,'HTC_Desire')   !== false ||
                stripos($this->_agent,'HTC Desire')   !== false ||
            	stripos($this->_agent,'Desire_A8181') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE);
                return true;
            }
        }
        return false;
    }
360591
function DetectGoogleTV()
   {
      if (stripos($this->useragent, $this->deviceGoogleTV) > -1)
         return $this->true; 
      else
         return $this->false; 
   }
173730
public boolean matchesBrowser(String currentBrowser) {

        if (currentBrowser == null) {
            return false;
        }
        for (int i = 0; i < getBrowserPattern().size(); i++) {
            boolean matches = getBrowserPattern().get(i).matcher(currentBrowser.trim()).matches();
            if (matches) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug(Messages.get().getBundle().key(Messages.LOG_BROWSER_MATCHES_CONFIG_1, currentBrowser));
                }
                return true;
            }
        }
        return false;
    }
379021
protected function checkBrowserChrome()
    {
        if (stripos($this->_agent, 'Chrome') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'Chrome'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                $this->setVersion($aversion[0]);
                $this->setBrowser(self::BROWSER_CHROME);
                //Chrome on Android
                if (stripos($this->_agent, 'Android') !== false) {
                    if (stripos($this->_agent, 'Mobile') !== false) {
                        $this->setMobile(true);
                    } else {
                        $this->setTablet(true);
                    }
                }
                return true;
            }
        }
        return false;
    }
1226026
protected function checkBrowserNetPositive()
    {
        if (stripos($this->_agent, 'NetPositive') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'NetPositive'));
            $aversion = explode(' ', $aresult[1]);
            $this->setVersion(str_replace(['(', ')', ';'], '', $aversion[0]));
            $this->setBrowser(self::BROWSER_NETPOSITIVE);

            return true;
        }

        return false;
    }
777948
public boolean detectNintendo() {

        if ((userAgent.indexOf(deviceNintendo) != -1)
            || (userAgent.indexOf(deviceWii) != -1)
            || (userAgent.indexOf(deviceNintendoDs) != -1)) {
            return true;
        }
        return false;
    }
645890
public static function checkBrowserOmniWeb()
    {
        if (stripos(self::$userAgentString, 'omniweb') !== false) {
            $aresult = explode('/', stristr(self::$userAgentString, 'omniweb'));
            $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : '');
            self::$browser->setVersion($aversion[0]);
            self::$browser->setName(Browser::OMNIWEB);

            return true;
        }

        return false;
    }
1165829
protected function checkBrowseriPod()
    {
        if (stripos($this->_agent, 'iPod') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'Version'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                $this->setVersion($aversion[0]);
            } else {
                $this->setVersion(self::VERSION_UNKNOWN);
            }
            $this->setMobile(true);
            $this->setBrowser(self::BROWSER_IPOD);

            return true;
        }

        return false;
    }
1202733
def detectPalmOS(self):
        
        #Most devices nowadays report as 'Palm', but some older ones reported as Blazer or Xiino.
        if UAgentInfo.devicePalm in self.__userAgent \
           or UAgentInfo.engineBlazer in self.__userAgent \
           or UAgentInfo.engineXiino in self.__userAgent:
            # Make sure it's not WebOS
            return not self.detectPalmWebOS()
        return False
1061065
protected function checkBrowserNokia()
    {
        if ($this->containString($this->_agent, array('Nokia5800', 'Nokia5530', 'Nokia5230'), true, false)) {
            $this->setBrowser(self::BROWSER_NOKIA);
            $this->setVersion('7.0');
            $this->setMobile(true);
            $this->setRobot(false);

            return true;
        }

        if ($this->checkSimpleBrowserUA(array('NokiaBrowser', 'BrowserNG', 'Series60', 'S60', 'S40OviBrowser'), $this->_agent, self::BROWSER_NOKIA, true)) {
            return true;
        }

        return false;
    }
294632
static public function isMobile()
    {
        if (isset($_SERVER['HTTP_VIA'])
            || isset($_SERVER['HTTP_X_NOKIA_CONNECTION_MODE'])
            || isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID'])
            // Check whether the browser/gateway says it accepts WML.
            || isset($_SERVER['HTTP_ACCEPT']) && strpos(strtoupper($_SERVER['HTTP_ACCEPT']), "VND.WAP.WML") > 0 )
        {
            return true;
        }
        
        $browser = isset($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : '';
        $clientkeywords = array(
            'nokia', 'sony', 'ericsson', 'mot', 'samsung', 'htc', 'sgh', 'lg', 'sharp', 'sie-'
            , 'philips', 'panasonic', 'alcatel', 'lenovo', 'iphone', 'ipod', 'blackberry', 'meizu',
            'android', 'netfront', 'symbian', 'ucweb', 'windowsce', 'palm', 'operamini',
            'operamobi', 'opera mobi', 'openwave', 'nexusone', 'cldc', 'midp', 'wap', 'mobile'
        );
        if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", $browser) && strpos($browser, 'ipad') === false) {
            return TRUE;
        } else {
            return FALSE;
        }
    }