Sessions::factory()
Creates a new Sessions instance from a loose options array
Sessions::factory(Store|string $store, array $options = []): Sessions
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $storerequired | Kirby\Session\Storeorstring |
no default value | Store object or a path to the storage directory (uses the FileStore) |
| $options | array |
[]
|
Optional additional options: - mode: Default token transmission mode (cookie, header or manual); defaults to cookie - cookieDomain: Domain to set the cookie to (this disables the cookie path restriction); defaults to none (default browser behavior) - 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 - 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) |