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
sessionName
private string $sessionName = 'hazaar-session'sessionId
public string $sessionIdsessionInit
private bool $sessionInitMethods
__construct
public __construct(array $options, ?string $backend): voidParameters
| Parameter | Type | Description |
|---|---|---|
$options | array | |
$backend | string |
set
public set(mixed $key, mixed $value, int $timeout): boolParameters
| Parameter | Type | Description |
|---|---|---|
$key | mixed | |
$value | mixed | |
$timeout | int |
clear
public clear(): voidGenerated by Hazaar API Doc Generator on Mon, 27 Oct 2025 13:01:29 +0000