Skip to content

Kirby 4.4.1

$visitor->userAgent()

Sets the user agent if provided or returns the user agent string of the current visitor otherwise

$visitor->userAgent(?string $userAgent = null): Kirby\Http\Visitor|string|null

Parameters

Name Type Default
$userAgent string|null null

Return type

Kirby\Http\Visitor|string|null

This method does not modify the existing $visitor object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Http\Visitor