From: Tim Düsterhus Date: Thu, 25 Feb 2021 09:04:15 +0000 (+0100) Subject: Add UserAgent::getUserAgent() X-Git-Tag: 5.4.0_Alpha_1~228 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60bd175a8349311bc264c2de8852678c67a42545;p=GitHub%2FWoltLab%2FWCF.git Add UserAgent::getUserAgent() --- diff --git a/wcfsetup/install/files/lib/util/UserAgent.class.php b/wcfsetup/install/files/lib/util/UserAgent.class.php index b54cd6740e..00e424e284 100644 --- a/wcfsetup/install/files/lib/util/UserAgent.class.php +++ b/wcfsetup/install/files/lib/util/UserAgent.class.php @@ -401,6 +401,22 @@ class UserAgent } } + /** + * Returns the raw user agent string. + */ + public function getUserAgent(): string + { + return $this->userAgent; + } + + /** + * @see UserAgent::getUserAgent() + */ + public function __toString(): string + { + return $this->getUserAgent(); + } + /** * Returns the browser based on the user agent or null, if no browser can be determined. */