Applies Catch-All match
@param string $userAgent
@return string WURFL deviceID
519044
public function applyRecoveryCatchAllMatch($userAgent) {
		if (WURFL_Handlers_Utils::isDesktopBrowserHeavyDutyAnalysis($userAgent)) {
			return WURFL_Constants::GENERIC_WEB_BROWSER;
		}
		$mobile = WURFL_Handlers_Utils::isMobileBrowser($userAgent);
		$desktop = WURFL_Handlers_Utils::isDesktopBrowser($userAgent);
		
		if (!$desktop) {
			$deviceId = WURFL_Handlers_Utils::getMobileCatchAllId($userAgent);
			if ($deviceId !== WURFL_Constants::NO_MATCH) {
				return $deviceId;
			}
		}
		
		if ($mobile) return WURFL_Constants::GENERIC_MOBILE;
		if ($desktop) return WURFL_Constants::GENERIC_WEB_BROWSER;
		return WURFL_Constants::GENERIC;
	}
1139952
public function lookForMatchingUserAgent($userAgent)
    {
        $tolerance = Utils::firstSlash($userAgent);

        return Utils::risMatch($this->userAgents, $userAgent, $tolerance);
    }
1126522
public static function getWindowsPhoneDesktopVersion($userAgent)
    {
        if (preg_match('|Windows NT (\d+\.\d+)|', $userAgent, $matches)) {
            if (strpos($matches[1], '10.0') !== false) {
                return '10.0';
            } elseif (strpos($matches[1], '6.3') !== false || strpos($matches[1], '8.1') !== false) {
                return '8.1';
            } else {
                return '8.0';
            }
        }

        return null;
    }
127303
public function platform($userAgent = null)
    {
        // Get platform rules
        $rules = $this->mergeRules(
            static::$operatingSystems,
            static::$additionalOperatingSystems // NEW
        );

        return $this->findDetectionRulesAgainstUA($rules, $userAgent);
    }
809257
public function applyConclusiveMatch($userAgent)
    {
        if (Utils::checkIfContains($userAgent, 'Nintendo WiiU')) {
            return 'nintendo_wii_u_ver1';
        }

        if (Utils::checkIfContains($userAgent, 'Nintendo Wii')) {
            return 'nintendo_wii_ver1';
        }

        if (Utils::checkIfContains($userAgent, 'Nintendo DSi')) {
            return 'nintendo_dsi_ver1';
        }

        if (Utils::checkIfStartsWith($userAgent, 'Mozilla/')
            && Utils::checkIfContainsAll($userAgent, array('Nitro', 'Opera'))
        ) {
            return 'nintendo_ds_ver1';
        }

        return 'nintendo_wii_ver1';
    }
781885
public function applyRecoveryMatch($userAgent)
    {
        if (Utils::checkIfContains($userAgent, 'SmartTV')) {
            return 'generic_smarttv_browser';
        }

        if (Utils::checkIfContains($userAgent, 'GoogleTV')) {
            return 'generic_smarttv_googletv_browser';
        }

        if (Utils::checkIfContains($userAgent, 'AppleTV')) {
            return 'generic_smarttv_appletv_browser';
        }

        if (Utils::checkIfContains($userAgent, 'Boxee')) {
            return 'generic_smarttv_boxeebox_browser';
        }

        if (Utils::checkIfContains($userAgent, 'CrKey')) {
            return 'generic_smarttv_chromecast';
        }

        return 'generic_smarttv_browser';
    }
771630
public function isTablet($userAgent = null)
    {
        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        foreach (self::$tabletDevices as $_regex) {
            if ($this->match($_regex, $userAgent)) {
                return true;
            }
        }

        return false;
    }
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;
	}
838279
private function matchDetectionRulesAgainstUA($userAgent = null){

        // Begin general search.
        foreach($this->getRules() as $_regex){
            if(empty($_regex)){ continue; }
            if( $this->match($_regex, $userAgent) ){
                //var_dump( $_regex );
                return true;
            }
        }

        return false;

    }
1245201
public static function detect(Device $device, UserAgent $userAgent)
    {
        $device->setName($device::UNKNOWN);

        return (
            self::checkIpad($device, $userAgent) ||
            self::checkIphone($device, $userAgent) ||
            self::checkWindowsPhone($device, $userAgent) ||
            self::checkSamsungPhone($device, $userAgent)
        );
    }
427679
public function applyConclusiveMatch($userAgent)
    {
        $tolerance = Utils::toleranceToRisDelimeter($userAgent);
        if ($tolerance !== false) {
            return $this->getDeviceIDFromRIS($userAgent, $tolerance);
        }

        return WurflConstants::NO_MATCH;
    }
639867
public function applyConclusiveMatch($userAgent)
    {
        if (Utils::checkIfContains($userAgent, 'GoogleImageProxy')) {
            return 'google_image_proxy';
        }

        if (Utils::checkIfStartsWith($userAgent, 'Mozilla')) {
            $tolerance = Utils::firstCloseParen($userAgent);
        } else {
            $tolerance = Utils::firstSlash($userAgent);
        }

        return $this->getDeviceIDFromRIS($userAgent, $tolerance);
    }
764768
public function device($userAgent = null)
    {
        // Get device rules
        $rules = $this->mergeRules(
            static::$additionalDevices, // NEW
            static::$phoneDevices,
            static::$tabletDevices,
            static::$utilities
        );

        return $this->findDetectionRulesAgainstUA($rules, $userAgent);
    }
743110
public function applyConclusiveMatch($userAgent)
    {
        $delimiterIndex = strpos($userAgent, WurflConstants::RIS_DELIMITER);

        if ($delimiterIndex !== false) {
            $tolerance = $delimiterIndex + strlen(WurflConstants::RIS_DELIMITER);

            return $this->getDeviceIDFromRIS($userAgent, $tolerance);
        }

        return WurflConstants::NO_MATCH;
    }
11939
public function filter($userAgent, $deviceID) {
		WURFL_Handlers_Utils::reset();
		$this->_userAgentHandlers[0]->filter($userAgent, $deviceID);
	}
251742
public function browser($userAgent = null)
    {
        // Get browser rules
        $rules = $this->mergeRules(
            static::$additionalBrowsers, // NEW
            static::$browsers
        );

        return $this->findDetectionRulesAgainstUA($rules, $userAgent);
    }
1328451
public function BD_CheckBotAgentAdvanced($UserAgent = false)
    {
        if ($UserAgent === false)
        {
                $UserAgent = trim(\Environment::get('httpUserAgent'));
        }
        return \BugBuster\BotDetection\CheckBotAgentExtended::checkAgentName( $UserAgent );
    }