Session
Less than 1 minute
Session
Session class
Sessions make use of the Hazaar\Cache class but they create a unique session ID so stored data is not shared between user sessions. If you want to store data that can be shared then use the Hazaar\Cache classes directly.
Properties
session_name
private string $session_name = 'hazaar-session'
session_id
public string $session_id
session_init
private bool $session_init
Methods
__construct
public __construct(array $options = [], ?string $backend): void
Parameters
Parameter | Type | Description |
---|---|---|
$options | array | |
$backend | string |
set
public set(mixed $key, mixed $value, int $timeout = 0): bool
Parameters
Parameter | Type | Description |
---|---|---|
$key | mixed | |
$value | mixed | |
$timeout | int |
clear
public clear(): void
Generated by Hazaar API Doc Generator