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;
    }
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;
    }
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 ; }
detect the useragent

@return string
detect the useragent