@param string $userAgent

@return null|string
770866
public function applyConclusiveMatch($userAgent)
    {
        // Example Windows 8 RT MSIE 10 UA:
        // Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)
        //                                                        ^ RIS Tolerance
        //Example Windows 8.1 RT MSIE 11 UA
        //Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko
        //																    	  ^ RIS Tolerance

        if (Utils::checkIfContainsAll($userAgent, array('like Gecko'))) {
            //Use this logic for MSIE 11 and above
            $search = ' Gecko';
            $idx    = strpos($userAgent, $search);
            if ($idx !== false) {
                // Match to the end of the search string
                return $this->getDeviceIDFromRIS($userAgent, $idx + strlen($search));
            }
        } else {
            $search = ' ARM;';
            $idx    = strpos($userAgent, $search);
            if ($idx !== false) {
                // Match to the end of the search string
                return $this->getDeviceIDFromRIS($userAgent, $idx + strlen($search));
            }
        }

        return WurflConstants::NO_MATCH;
    }
944078
protected function findBrowser(string $userAgent)
    {
        // Check each keyword table for the browser pattern
        $this->findBrowserInKeywordTables($userAgent);

        // If no match found in keyword tables, check the default table
        // (this also includes the '*' pattern for the default match).
        if ($this->browserId === null) {
            $this->findBrowserInDefaultTable($userAgent);
        }

        // Check if data found (the last step should always find the default settings)
        if ($this->browserId === null) {
            throw new ParserRuntimeException(
                "No result found for user agent '$userAgent'. There seems to be something wrong with the data."
            );
        }
    }
74508
private function chromeWithMajorVersion($userAgent) {
		$start_idx = strpos($userAgent, 'Chrome');
		$end_idx = strpos($userAgent, '.', $start_idx);
		if ($end_idx === false) {
			return substr($userAgent, $start_idx);
		} else {
			return substr($userAgent, $start_idx, ($end_idx - $start_idx));
		}
	}
1008997
public function getUserAgent()
    {
        if (isset($this->_userAgent)) {
            return $this->_userAgent;
        }
        return $this->_userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
    }
385715
public function applyConclusiveMatch($userAgent)
    {
        if (WURFL_Configuration_ConfigHolder::getWURFLConfig()->isHighPerformance()) {
            //High performance mode
            $tolerance = WURFL_Handlers_Utils::firstCloseParen($userAgent);
            return $this->getDeviceIDFromRIS($userAgent, $tolerance);
        } else {
            //High accuracy mode
            return $this->getDeviceIDFromLD($userAgent, 5);
        }
    }
1189022
public function getDeviceForUserAgent($userAgent)
    {
        if (!isset($userAgent)) {
            $userAgent = '';
        }
        
        $request = $this->_requestFactory->createRequestForUserAgent($userAgent);
        return $this->getDeviceForRequest($request);
    }
587581
function setUserAgent($useragent = null)
    {
        $this->userAgent = $useragent;
        curl_setopt($this->ch, CURLOPT_USERAGENT, $useragent);
    }
294097
public function httpGet($url, $userAgent = null)
    {
        $ch = $this->commonCurlParams($url,$userAgent);

        // Setting the HTTP header with the Access Token only for Getting user info
        if ($this->header) {
            $this->headerArray[] = 'Authorization: bearer ' . $this->accessToken;
        }

        $response = $this->execute($ch);
        return $response;
    }
1066503
public function applyConclusiveMatch($userAgent)
    {
        $tolerance = Utils::toleranceToRisDelimeter($userAgent);
        if ($tolerance !== false) {
            return $this->getDeviceIDFromRIS($userAgent, $tolerance);
        }

        $tolerance = Utils::firstSlash($userAgent);

        return $this->getDeviceIDFromRIS($userAgent, $tolerance);
    }
648462
public function applyExactMatch($userAgent)
    {
        if (array_key_exists($userAgent, $this->userAgentsWithDeviceID)) {
            return $this->userAgentsWithDeviceID[$userAgent];
        }

        return WurflConstants::NO_MATCH;
    }
1269450
public function normalize($userAgent)
    {
        // Don't normalize generic user agents
        if (substr($userAgent, 0, 12) == 'DO_NOT_MATCH') {
            return $userAgent;
        }
        $normalizedUserAgent = $userAgent;
        foreach ($this->_userAgentNormalizers as $normalizer) {
            $normalizedUserAgent = $normalizer->normalize($normalizedUserAgent);
        }
        return $normalizedUserAgent;
    }
1111838
public function applyConclusiveMatch($userAgent) {
		$deviceId = WURFL_Constants::GENERIC;
		if (WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla')) {
			$deviceId = $this->applyMozillaConclusiveMatch($userAgent);
		} else {
			$tolerance = WURFL_Handlers_Utils::firstSlash($userAgent);
			$deviceId = $this->getDeviceIDFromRIS($userAgent, $tolerance);
		}
		
		return $deviceId;
	}
1000009
public function applyRecoveryMatch($userAgent)
    {
        $androidVersion = str_replace('.', '_', AndroidHandler::getAndroidVersion($userAgent));
        $deviceID       = 'generic_android_ver' . $androidVersion . '_ucweb';

        if (in_array($deviceID, self::$constantIDs)) {
            return $deviceID;
        } else {
            return 'generic_android_ver2_0_ucweb';
        }
    }
1235516
public function getDeviceForUserAgent($userAgent = '')
    {
        if (!is_string($userAgent)) {
            $userAgent = '';
        }

        $requestFactory = new Request\GenericRequestFactory();

        $request = $requestFactory->createRequestForUserAgent($userAgent);
        $device  = $this->getDeviceForRequest($request);

        return $device;
    }
835555
public function normalize($userAgent)
    {
        $isOperaMobile = Utils::checkIfContains($userAgent, 'Opera Mobi');
        $isOperaTablet = Utils::checkIfContains($userAgent, 'Opera Tablet');

        if ($isOperaMobile || $isOperaTablet) {
            $operaVersion   = OperaMobiOrTabletOnAndroidHandler::getOperaOnAndroidVersion($userAgent, false);
            $androidVersion = AndroidHandler::getAndroidVersion($userAgent, false);

            if ($operaVersion !== null && $androidVersion !== null) {
                $operaModel = $isOperaTablet ? 'Opera Tablet' : 'Opera Mobi';
                $prefix     = $operaModel . ' ' . $operaVersion . ' Android ' . $androidVersion . WurflConstants::RIS_DELIMITER;

                return $prefix . $userAgent;
            }
        }

        return $userAgent;
    }
834627
public static function toleranceToRisDelimeter($userAgent)
    {
        $tolerance = strpos($userAgent, WurflConstants::RIS_DELIMITER);
        if ($tolerance === false) {
            return false;
        }

        // Push the tolerance to the *end* of the RIS Delimiter
        return $tolerance + strlen(WurflConstants::RIS_DELIMITER);
    }
1139952
public function lookForMatchingUserAgent($userAgent)
    {
        $tolerance = Utils::firstSlash($userAgent);

        return Utils::risMatch($this->userAgents, $userAgent, $tolerance);
    }