@param string $userAgent

@return null|string
546520
public function applyConclusiveMatch($userAgent)
    {
        $tolerance = Utils::toleranceToRisDelimeter($userAgent);
        if ($tolerance !== false) {
            return $this->getDeviceIDFromRIS($userAgent, $tolerance);
        }

        $operaMiniIndex = Utils::indexOfOrLength($userAgent, 'Opera Mini');

        if ($operaMiniIndex !== false) {
            // Match up to the first '.' after 'Opera Mini'
            $tolerance = strpos($userAgent, '.', $operaMiniIndex);

            if ($tolerance !== false) {
                // +1 to match just after the '.'
                return $this->getDeviceIDFromRIS($userAgent, $tolerance + 1);
            }
        }

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

        return $this->getDeviceIDFromRIS($userAgent, $tolerance);
    }
690399
public function applyConclusiveMatch($userAgent)
    {
        $match = $this->lookForMatchingUserAgent($userAgent);

        if (!empty($match)) {
            return $this->userAgentsWithDeviceID[$match];
        }

        return WurflConstants::NO_MATCH;
    }
942970
public static function isRobot($userAgent)
    {
        self::$isRobot = false;
        $userAgent     = strtolower($userAgent);

        foreach (self::$robots as $key) {
            if (strpos($userAgent, $key) !== false) {
                self::$isRobot = true;
                break;
            }
        }

        return self::$isRobot;
    }
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);
    }
182648
public function robot($userAgent = null)
    {
        if ($this->getCrawlerDetect()->isCrawler($userAgent ?: $this->userAgent)) {
            return ucfirst($this->getCrawlerDetect()->getMatches());
        }

        return false;
    }
1197156
public function applyConclusiveMatch($userAgent)
    {
        $find      = 'NetFrontLifeBrowser/2.2';
        $tolerance = strpos($userAgent, $find) + strlen($find);

        if ($tolerance > strlen($userAgent)) {
            $tolerance = strlen($userAgent);
        }

        return $this->getDeviceIDFromRIS($userAgent, $tolerance);
    }
1255637
public function applyRecoveryMatch($userAgent)
    {
        if (Utils::checkIfContainsAll(
            $userAgent,
            array('Windows NT 5', 'POLARIS')
        )
        ) {
            return 'generic_lguplus_rexos_facebook_browser';
        }

        if (Utils::checkIfContains($userAgent, 'Windows NT 5')) {
            return 'generic_lguplus_rexos_webviewer_browser';
        }

        if (Utils::checkIfContainsAll(
            $userAgent,
            array('Windows CE', 'POLARIS')
        )
        ) {
            return 'generic_lguplus_winmo_facebook_browser';
        }

        if (Utils::checkIfContainsAll(
            $userAgent,
            array('Android', 'AppleWebKit')
        )
        ) {
            return 'generic_lguplus_android_webkit_browser';
        }

        return WurflConstants::NO_MATCH;
    }
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;
	}
313882
public function userAgent($useragent) {

		if(false === is_string($useragent)) {
            return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($useragent)), E_USER_ERROR);
        }

		$this -> options[CURLOPT_USERAGENT] = $useragent;

		return $this;
	}
587581
function setUserAgent($useragent = null)
    {
        $this->userAgent = $useragent;
        curl_setopt($this->ch, CURLOPT_USERAGENT, $useragent);
    }
117499
public function robot($userAgent = null)
    {
        return $this->isRobot($userAgent)
            ? ucfirst($this->getCrawlerDetector()->getMatches())
            : false;
    }
592545
public static function getWindowsPhoneDesktopModel($userAgent)
    {
        // Normalize spaces in UA before capturing parts
        $userAgent = preg_replace('|;(?! )|', '; ', $userAgent);
        if (preg_match('|\(Windows NT [\d\.]+?; ARM; ([^;\)]+(; ?[^;\)]+)?).+?Edge/\d|', $userAgent, $matches)
            || preg_match(
                '|\(Windows NT [\d\.]+?; ARM;.+?; WPDesktop; ([^;\)]+(; ?[^;\)]+)?)\) like Gecko|',
                $userAgent,
                $matches
            )
        ) {
            $model = $matches[1];
            $model = str_replace('_blocked', '', $model);
            $model = preg_replace('/(NOKIA; RM-.+?)_.*/', '$1', $model, 1);
            $model = preg_replace('/(Microsoft; RM-.+?)_.*/', '$1', $model, 1);

            return $model;
        }

        return null;
    }
191085
public function normalize($userAgent)
    {
        $model     = WebOSHandler::getWebOSModelVersion($userAgent);
        $osVersion = WebOSHandler::getWebOSVersion($userAgent);

        if ($model !== null && $osVersion !== null) {
            $prefix = $model . ' ' . $osVersion . WurflConstants::RIS_DELIMITER;

            return $prefix . $userAgent;
        }

        return $userAgent;
    }
1157032
public function normalize($userAgent)
    {
        // Normalize Android version
        $model   = AndroidHandler::getAndroidModel($userAgent, false);
        $version = AndroidHandler::getAndroidVersion($userAgent, false);
        if ($model !== null && $version !== null) {
            $prefix = $version . ' ' . $model . WurflConstants::RIS_DELIMITER;

            return $prefix . $userAgent;
        }

        return $userAgent;
    }
1008997
public function getUserAgent()
    {
        if (isset($this->_userAgent)) {
            return $this->_userAgent;
        }
        return $this->_userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
    }
780993
public function applyRecoveryMatch($userAgent)
    {
        $tolerance = Utils::indexOfOrLength($userAgent, '/', strpos($userAgent, 'Samsung'));

        return $this->getDeviceIDFromRIS($userAgent, $tolerance);
    }
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."
            );
        }
    }