Contao\Environment::httpUserAgent PHP Метод

httpUserAgent() защищенный статический Метод

Return the user agent as string
protected static httpUserAgent ( ) : string
Результат string The user agent string
    protected static function httpUserAgent()
    {
        $ua = strip_tags($_SERVER['HTTP_USER_AGENT']);
        $ua = preg_replace('/javascript|vbscri?pt|script|applet|alert|document|write|cookie/i', '', $ua);
        return substr($ua, 0, 255);
    }