Skip to content

Kirby 3.8.4

new AutoSession()

Creates a new AutoSession instance

new AutoSession(\Kirby\Session\SessionStore|string $store, array $options = [ ])

Parameters

Name Type Default Description
$store * Kirby\Session\SessionStore|string SessionStore object or a path to the storage directory (uses the FileSessionStore)
$options array [ ] Optional additional options:
- durationNormal: Duration of normal sessions in seconds; defaults to 2 hours
- durationLong: Duration of "remember me" sessions in seconds; defaults to 2 weeks
- timeout: Activity timeout in seconds (integer or false for none); only used for normal sessions; defaults to 1800 (half an hour)
- cookieName: Name to use for the session cookie; defaults to kirby_session
- gcInterval: How often should the garbage collector be run?; integer or false for never; defaults to 100

Parent class

Kirby\Session\AutoSession