Skip to content

Kirby 5.2.0

$session->duration()

Gets or sets the session duration Setting the duration also updates the expiry time and regenerates the session token

$session->duration(int|null $duration = null): int

Parameters

Name Type Default Description
$duration intornull null Optional new duration in seconds to set

Return type

int

Number of seconds

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

Parent class

Kirby\Session\Session