Skip to content

Kirby 5.0.4

$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 stringornull null

Return types

Kirby\Http\Visitororstringornull

This method modifies the existing $visitor object it is applied to and returns it again.

Parent class

Kirby\Http\Visitor