$visitor->userAgent()
Sets the user agent if provided or returns the user agent string of the current visitor otherwise
$visitor->userAgent(string|null $userAgent = null): Kirby\Http\Visitor|string|null
Parameters
Name | Type | Default |
---|---|---|
$userAgent | string ornull |
null
|
Return types
Kirby\Http\Visitor
orstring
ornull
This method modifies the existing $visitor
object it is applied to and returns it again.