detect the useragent

@return string
518733
public function getUserAgent() : string
    {
        $userAgent = '';

        foreach ($this->userAgentHeaders as $header) {
            if (array_key_exists($header, $this->source)
                && $this->source[$header]
            ) {
                $userAgent = $this->cleanParam($this->source[$header]);

                break;
            }
        }

        return $userAgent;
    }
629913
public function getUserAgent(): string
    {
        if (null === $this->cachedUserAgent) {
            $this->cachedUserAgent = $this->generate();
        }

        return $this->cachedUserAgent;
    }
1084232
public static function isRobot($userAgent) {
		if (self::$_is_robot !== null) return self::$_is_robot;
		self::$_is_robot = false;
		$userAgent = strtolower($userAgent);
		foreach (self::$robots as $key) {
			if (strpos($userAgent, $key) !== false) {
				self::$_is_robot = true;
				break;
			}
		}
		return self::$_is_robot;
	}
1234561
public function getUserAgent()
    {
        if (empty($this->userAgent)) {
            $this->userAgent = self::DEFAULT_USERAGENT;
        }
        return $this->userAgent;
    }
577261
public function lookForMatchingUserAgent($userAgent)
    {
        $tolerance = WURFL_Handlers_Utils::firstSlash($userAgent);
        return WURFL_Handlers_Utils::risMatch(array_keys($this->userAgentsWithDeviceID), $userAgent, $tolerance);
    }
490790
private function getUserAgent(Request $request)
    {
        if (!$this->userAgent) {
            $this->userAgent = $request->headers->get('User-Agent');
        }

        return $this->userAgent;
    }
629866
public static function isSmartTV($userAgent)
    {
        if (self::$isSmartTv !== null) {
            return self::$isSmartTv;
        }
        self::$isSmartTv = false;
        $userAgent       = strtolower($userAgent);
        foreach (self::$smartTVBrowsers as $key) {
            if (strpos($userAgent, $key) !== false) {
                self::$isSmartTv = true;
                break;
            }
        }

        return self::$isSmartTv;
    }
1130102
public function getShortHashedUserAgent() {

        $uaString       = $this->client->userAgent;
        $browserVersion = $this->client->browserVersion;
        $uaShort        = str_replace($browserVersion, 'abcd', $uaString);

        return md5($this->get('uri.base.full') . $uaShort);
    }
273019
public function setUserAgent($userAgent = null)
        {
            if (!empty($userAgent)) {
                return $this->userAgent = $userAgent;
            } else {
                $this->userAgent = null;
                foreach($this->getUaHttpHeaders() as $altHeader) {
                    if(!empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
                        $this->userAgent .= $this->httpHeaders[$altHeader] . " ";
                    }
                }
                return $this->userAgent = (!empty($this->userAgent) ? trim($this->userAgent) : null);
            }
        }
839021
public function getUserIdentifier() {
        if (!isset($this->userIdentifier)) {
            $user = $this->getData(OntologyDeliveryExecution::PROPERTY_SUBJECT);
            $this->userIdentifier =  ($user instanceof core_kernel_classes_Resource) ? $user->getUri() : (string)$user;
        }
        return $this->userIdentifier;
    }
1014173
public function isCrawler($userAgent = null)
    {
        $agent = trim(preg_replace(
            "/{$this->compiledExclusions}/i",
            '',
            $userAgent ?: $this->userAgent
        ));

        if ($agent == '') {
            return false;
        }

        $result = preg_match("/{$this->compiledRegex}/i", $agent, $matches);

        if ($matches) {
            $this->matches = $matches;
        }

        return (bool) $result;
    }
416406
public function getAgent() : ?string 
    {
        if ( ! $this->hasAgent()) {
            $this->setAgent($this->getDefaultAgent());
        }
        return $this->agent;
    }
939177
public function getUserAgent(): string
    {
        $userAgent = 'Swoft/' . App::version();
        $userAgent .= ' Swoft/' . SWOOLE_VERSION;
        $userAgent .= ' PHP/' . PHP_VERSION;
        return $userAgent;
    }
1016909
public function getUserAgent($user_agent = null, $return_array = false, $full_info = false) {
		if ($full_info) { return get_browser($user_agent, $return_array); }

		return $_SERVER['HTTP_USER_AGENT'];
	}
668162
private function _user_agent() {

        // browser version: 9 or 10
        $version = rand(9, 10);

        // windows version; here are the meanings:
        // Windows NT 6.2   ->  Windows 8                                       //  can have IE10
        // Windows NT 6.1   ->  Windows 7                                       //  can have IE9 or IE10
        // Windows NT 6.0   ->  Windows Vista                                   //  can have IE9
        $major_version = 6;

        $minor_version =

            // for IE9 Windows can have "0", "1" or "2" as minor version number
            $version == 8 || $version == 9 ? rand(0, 2) :

            // for IE10 Windows will have "2" as major version number
            2;

        // add some extra information
        $extras = rand(0, 3);

        // return the random user agent string
        return 'Mozilla/5.0 (compatible; MSIE ' . $version . '.0; Windows NT ' . $major_version . '.' . $minor_version . ($extras == 1 ? '; WOW64' : ($extras == 2 ? '; Win64; IA64' : ($extras == 3 ? '; Win64; x64' : ''))) . ')';

    }
266605
protected function getBrowserId(string $userAgent) : int
    {
        if ($this->browserId === null) {
            $this->findBrowser($userAgent);
        }

        return $this->browserId;
    }
750644
function DetectAmazonSilk()
   {
      if (stripos($this->useragent, $this->engineSilk) > -1)
         return $this->true; 
      else
         return $this->false; 
   }